00001 00012 #include <hprocess.h> 00013 00014 #ifndef HDSCHED_H 00015 #define HDSCHED_H 00016 00017 00018 enum hdsevent { 00019 HDSE_NEW_PROCESS 00020 ,HDSE_QUIT 00021 ,HDSE_SHORT 00022 ,HDSE_RESCHED_TIMER 00023 ,HDSE_RESCHED_PRIORITY 00024 ,HDSE_RESCHED_IO 00025 }; 00026 00027 enum hdsreturn { 00028 HDSR_NO_BITFILE = -2 00029 ,HDSR_TOO_MANY = -1 00030 ,HDSR_READY = 0 00031 }; 00032 00035 void* hdsched_main(); 00036 00045 int hdsched_reschedule(struct hprocess* process, enum hdsevent event); 00046 00051 int hdsched_notify(enum hdsevent event); 00052 00063 int hdsched_processes_number(); 00064 00073 int hdsched_add_new_process(struct hprocess* process); 00074 00082 struct hprocess* hdsched_get_new_process(); 00083 00084 00092 struct hprocess* hdsched_get_next_process(); 00093 00094 #endif 00095