ISIX-RTOS - small operating system for ARM microcontrollers 1.2
|
00001 #ifndef __PORT_SCHEDULER_H 00002 #define __PORT_SCHEDULER_H 00003 #include <unistd.h> 00004 /*-----------------------------------------------------------------------*/ 00005 #ifdef __cplusplus 00006 extern "C" { 00007 namespace isix { 00008 #endif /*__cplusplus*/ 00009 00010 /*-----------------------------------------------------------------------*/ 00011 #ifdef __cplusplus 00012 static const unsigned ISIX_PORT_SCHED_MIN_STACK_DEPTH = 112; 00013 #else 00014 //Minimum stack depth 00015 #define ISIX_PORT_SCHED_MIN_STACK_DEPTH 112 00016 #endif /*__cplusplus*/ 00017 /*-----------------------------------------------------------------------*/ 00018 void port_yield( void ); 00019 00020 /*-----------------------------------------------------------------------*/ 00021 00022 void port_start_first_task( void ); 00023 00024 /*-----------------------------------------------------------------------*/ 00025 //TODO: IRQ lock and IRQ unlock 00026 void port_set_interrupt_mask( void ); 00027 00028 void port_clear_interrupt_mask( void ); 00029 /*-----------------------------------------------------------------------*/ 00030 //Cleanup task for example for free additional memory 00031 void port_cleanup_task(void *sp); 00032 00033 /*-----------------------------------------------------------------------*/ 00034 //Idle task additional 00035 static inline void port_idle_cpu( void ) 00036 { 00037 usleep(50); 00038 } 00039 00040 /*-----------------------------------------------------------------------*/ 00041 #ifdef __cplusplus 00042 } //end namespace 00043 } //end extern-C 00044 #endif /* __cplusplus */ 00045 00046 /*-----------------------------------------------------------------------*/ 00047 #endif 00048