00001 00008 #ifndef HPROCESS_H 00009 #define HPROCESS_H 00010 00011 #include "hstructures.h" 00012 00014 //#define HPROCESS_LOWEST_PRIORITY 0 00015 00016 #define HPROCESS_MAX_FILENAME_SIZE 100 00017 00019 #define HPS_NUMBER 5 00020 00021 enum hpstate { 00022 HPS_NEW 00023 ,HPS_READY 00024 ,HPS_BLOCKED 00025 ,HPS_BLOCKED_PLACED 00026 ,HPS_RUNNING 00027 }; 00028 00029 00037 const int hprocess_base_priority(); 00038 00043 const int hprocess_max_processes(); 00044 00051 int hprocess_set_bitfilename(struct hprocess* process, char* filename); 00052 00057 char* hprocess_get_bitfilename(struct hprocess* process); 00058 00067 struct hprocess* hprocess_get(int pid); 00068 00074 struct hprocess* hprocess_create(int nice); 00075 00082 int hprocess_set_priority(struct hprocess* process, int priority); 00083 00088 int hprocess_get_priority(struct hprocess* process); 00089 00098 int hprocess_set_nice(struct hprocess* process, int nice); 00099 00105 int hprocess_get_nice(struct hprocess* process); 00106 00112 int hprocess_get_pid(struct hprocess* process); 00113 00119 struct hprocess* hprocess_get_next(struct hprocess* process); 00120 00126 struct hprocess* hprocess_get_prev(struct hprocess* process); 00127 00133 int hprocess_get_state(struct hprocess* process); 00134 00140 int hprocess_is_valid_pid(int pid); 00141 00147 int hprocess_remove(struct hprocess* process); 00148 00154 struct hsqueue* hprocess_get_parent_queue(struct hprocess* process); 00155 00156 #endif 00157