17 #ifndef __POK_SCHED_H__ 
   18 #define __POK_SCHED_H__ 
   20 #if defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS) 
   26 #ifdef POK_NEEDS_PARTITIONS 
   27 extern uint8_t pok_current_partition;
 
   28 #define POK_SCHED_CURRENT_PARTITION pok_current_partition 
   33 #define POK_SCHED_CURRENT_THREAD current_thread 
   37   POK_STATE_STOPPED = 0,
 
   38   POK_STATE_RUNNABLE = 1,
 
   39   POK_STATE_WAITING = 2,
 
   41   POK_STATE_WAIT_NEXT_ACTIVATION = 4
 
   44 void pok_sched_init (
void); 
 
   46 void pok_sched (
void);      
 
   55 uint8_t pok_sched_election (
void);
 
   60 void pok_sched_context_switch (
const uint32_t);
 
   61 void pok_partition_switch (
void);
 
   66 void pok_sched_lock_thread (
const uint32_t);
 
   67 void pok_sched_unlock_thread (
const uint32_t);
 
   68 void pok_sched_lock_current_thread (
void);
 
   69 void pok_sched_lock_current_thread_timed (
const uint64_t time);
 
   70 void pok_sched_stop_thread (
const uint32_t tid);
 
   71 void pok_sched_stop_self (
void);
 
   74 #ifdef POK_NEEDS_PARTITIONS 
   75 void pok_sched_activate_error_thread (
void);