Changeset 70527f1 in mainline for src/proc/scheduler.c
- Timestamp:
- 2005-06-03T14:51:05Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 673104e
- Parents:
- ac5d02b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/proc/scheduler.c
rac5d02b r70527f1 57 57 volatile int nrdy; 58 58 59 60 /** Initialize context switching 61 * 62 * Initialize context switching and lazy FPU 63 * context switching. 64 * 65 */ 59 66 void before_thread_runs(void) 60 67 { … … 64 71 65 72 73 /** Initialize scheduler 74 * 75 * Initialize kernel scheduler. 76 * 77 */ 66 78 void scheduler_init(void) 67 79 { … … 69 81 } 70 82 71 /* cpu_priority_high()'d */ 83 84 /** Get thread to be scheduled 85 * 86 * Get the optimal thread to be scheduled 87 * according thread accounting and scheduler 88 * policy. 89 * 90 * @return Thread to be scheduled. 91 * 92 */ 72 93 struct thread *find_best_thread(void) 73 94 { … … 156 177 } 157 178 158 /* 159 * This function prevents low priority threads from starving in rq's. 160 * When it decides to relink rq's, it reconnects respective pointers 161 * so that in result threads with 'pri' greater or equal 'start' are 162 * moved to a higher-priority queue. 179 180 /** Prevent rq starvation 181 * 182 * Prevent low priority threads from starving in rq's. 183 * 184 * When the function decides to relink rq's, it reconnects 185 * respective pointers so that in result threads with 'pri' 186 * greater or equal 'start' are moved to a higher-priority queue. 187 * 188 * @param start Threshold priority. 189 * 163 190 */ 164 191 void relink_rq(int start) … … 193 220 } 194 221 195 /* 196 * The scheduler. 222 223 /** The scheduler 224 * 225 * The thread scheduling procedure. 226 * 197 227 */ 198 228 void scheduler(void) … … 238 268 } 239 269 270 271 /** Scheduler stack switch wrapper 272 * 273 * Second part of the scheduler() function 274 * using new stack. Handling the actual context 275 * switch to a new thread. 276 * 277 */ 240 278 void scheduler_separated_stack(void) 241 279 { … … 366 404 } 367 405 406 368 407 #ifdef __SMP__ 369 /* 370 * This is the load balancing thread. 371 * It supervises thread supplies for the CPU it's wired to. 408 /** Load balancing thread 409 * 410 * SMP load balancing thread, supervising thread supplies 411 * for the CPU it's wired to. 412 * 413 * @param arg Generic thread argument (unused). 414 * 372 415 */ 373 416 void kcpulb(void *arg)
Note:
See TracChangeset
for help on using the changeset viewer.