Golem  v0.1.1
Generic Operating system Libraries for Embedded Multitasking
 All Data Structures Files Functions Variables Pages
/home/ruud/Engineering/software/projects/golem-project-code/trunk/glm_scheduler.h
Go to the documentation of this file.
1 
21 #ifndef _GLM_SCHEDULER_H_
22 #define _GLM_SCHEDULER_H_
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* INCLUDES *******************************************************************/
29 #include <stdbool.h>
30 #include "glm_intbase.h"
31 #include "glm_tick.h"
32 
33 
34 /* TYPES **********************************************************************/
35 
44 typedef struct
45 {
48  uint_base_t slot_overruns;
49 } task_stats_t;
50 
51 
58 typedef struct
59 {
60  char * (*p_name_func)(void);
61  void (*p_run_func)(void);
62  void (*p_abort_func)(void);
63  uint_base_t slot_interval;
64  uint_base_t slot_offset;
65 } task_t;
66 
67 
68 /* PUBLIC FUNCTIONS ***********************************************************/
69 
77 extern void scheduler_run();
78 
79 
81 extern void scheduler_abort();
82 
83 
92 extern void scheduler_stats(task_stats_t * a_stats);
93 
94 
112 extern bool scheduler_task_stats( uint_base_t a_task, task_t *a_params,
113  task_stats_t *a_stats );
114 
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif /* _GLM_SCHEDULER_H_ */