Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/schedule/Scheduler.h @ 836:74fd8d2a7b9d draft
example fix 50%
author | tkaito |
---|---|
date | Tue, 25 May 2010 19:13:28 +0900 |
parents | c63110ac1430 |
children | d7b0c0f8514c |
comparison
equal
deleted
inserted
replaced
829:c3fb62d9355f | 836:74fd8d2a7b9d |
---|---|
44 extern "C" { | 44 extern "C" { |
45 extern long random(); | 45 extern long random(); |
46 } | 46 } |
47 | 47 |
48 class Scheduler { | 48 class Scheduler { |
49 private: | |
50 TaskManagerImpl* manager_tmp; | |
51 | |
49 public: | 52 public: |
50 virtual ~Scheduler(); | 53 virtual ~Scheduler(); |
51 | |
52 BASE_NEW_DELETE(Scheduler); | 54 BASE_NEW_DELETE(Scheduler); |
53 | 55 |
54 /* variables */ | 56 /* variables */ |
55 int id; | 57 int id; |
56 MemHash *hash; | 58 MemHash *hash; |
94 /* GlobalMemory */ | 96 /* GlobalMemory */ |
95 void* global_alloc(int id, int size); | 97 void* global_alloc(int id, int size); |
96 void* global_get(int id); | 98 void* global_get(int id); |
97 void global_set(int id, void *addr); | 99 void global_set(int id, void *addr); |
98 void global_free(int id); | 100 void global_free(int id); |
101 //MemList* createMemList(int size, int count); | |
99 MemList* createMemList(int size, int count); | 102 MemList* createMemList(int size, int count); |
100 void free_(void *p) { free(p); } | 103 void free_(void *p) { free(p); } |
101 | 104 |
102 virtual void mainMem_alloc(int id, int size) {}; | 105 virtual void mainMem_alloc(int id, int size) {}; |
103 virtual void mainMem_wait() {}; | 106 virtual void mainMem_wait() {}; |
122 void dma_loadList(ListDataPtr list, void *, uint32 mask); | 125 void dma_loadList(ListDataPtr list, void *, uint32 mask); |
123 void dma_storeList(ListDataPtr list, void *, uint32 mask); | 126 void dma_storeList(ListDataPtr list, void *, uint32 mask); |
124 | 127 |
125 /* manager */ | 128 /* manager */ |
126 | 129 |
127 void set_manager(TaskManagerImpl *m) { manager = m; }; | 130 void set_manager(TaskManagerImpl *m) { |
131 manager = m; | |
132 }; | |
128 | 133 |
129 /* user */ | 134 /* user */ |
130 | 135 |
131 long get_random() ; | 136 long get_random() ; |
132 Scheduler *get_scheduler() { return this; }; | 137 Scheduler *get_scheduler() { return this; }; |