POK
errorhandlerworker.c
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Fri Jan 16 17:13:16 2009
15  */
16 
17 #if defined (POK_NEEDS_ERROR_HANDLING) && ( ! defined (POK_USE_GENERATED_ERROR_HANDLER))
18 #include <core/error.h>
19 #include <core/thread.h>
20 #include <core/partition.h>
21 
22 /*
23  * This is a default error handler and it is used
24  * when no error handled is defined.
25  * Most of the time, the generated code provides
26  * its own error handler.
27  */
28 
29 void pok_error_handler_worker ()
30 {
31  uint32_t thread = 0;
32  uint32_t error = 0;
33 
34  pok_error_handler_set_ready (&thread, &error);
35 
36  while (1)
37  {
38  pok_partition_set_mode (POK_PARTITION_STATE_STOPPED);
39  }
40 }
41 
42 #endif