ISIX-RTOS - small operating system for ARM microcontrollers 1.2

scheduler.h

Go to the documentation of this file.
00001 #ifndef _ISIX_SCHEDULER_H
00002 #define _ISIX_SCHEDULER_H
00003 /*-----------------------------------------------------------------------*/
00004 #include <isix/config.h>
00005 #include <isix/types.h>
00006 #include <isix/port_scheduler.h>
00007 /*-----------------------------------------------------------------------*/
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 namespace isix {
00012 #endif /*__cplusplus*/
00013 
00014 /*-----------------------------------------------------------------------*/
00016 typedef void (*task_func_ptr_t)(void*);
00017 
00018 /*-----------------------------------------------------------------------*/
00020 typedef uint8_t prio_t;
00021 /*-----------------------------------------------------------------------*/
00022 
00024 static inline void isix_yield() { port_yield(); }
00025 
00026 /*-----------------------------------------------------------------------*/
00027 #ifdef __cplusplus
00028 static const unsigned ISIX_HZ = ISIX_CONFIG_HZ;
00029 #else
00030 
00031 #define ISIX_HZ ISIX_CONFIG_HZ
00032 #endif
00033 
00034 /*-----------------------------------------------------------------------*/
00035 
00037 struct task_struct;
00038 typedef struct task_struct task_t;
00039 
00040 /*-----------------------------------------------------------------------*/
00042 void isix_bug(void);
00043 
00044 /*-----------------------------------------------------------*/
00048 tick_t isix_get_jiffies(void);
00049 
00050 
00051 /*-----------------------------------------------------------------------*/
00053 void isix_start_scheduler(void) __attribute__((noreturn));
00054 
00055 /*-----------------------------------------------------------------------*/
00056 
00059 void isix_init(prio_t num_priorities);
00060 
00061 /*-----------------------------------------------------------------------*/
00065 prio_t isix_get_min_priority(void);
00066 /*-----------------------------------------------------------------------*/
00070 bool isix_is_scheduler_active(void);
00071 
00072 /*-----------------------------------------------------------------------*/
00073 #ifdef __cplusplus
00074 }       //end namespace
00075 }       //end extern-C
00076 #endif /* __cplusplus */
00077 /*-----------------------------------------------------------------------*/
00078 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines