Changeset 70527f1 in mainline for src/proc/scheduler.c


Ignore:
Timestamp:
2005-06-03T14:51:05Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
673104e
Parents:
ac5d02b
Message:

doxygen-style comments
cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/proc/scheduler.c

    rac5d02b r70527f1  
    5757volatile int nrdy;
    5858
     59
     60/** Initialize context switching
     61 *
     62 * Initialize context switching and lazy FPU
     63 * context switching.
     64 *
     65 */
    5966void before_thread_runs(void)
    6067{
     
    6471
    6572
     73/** Initialize scheduler
     74 *
     75 * Initialize kernel scheduler.
     76 *
     77 */
    6678void scheduler_init(void)
    6779{
     
    6981}
    7082
    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 */
    7293struct thread *find_best_thread(void)
    7394{
     
    156177}
    157178
    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 *
    163190 */
    164191void relink_rq(int start)
     
    193220}
    194221
    195 /*
    196  * The scheduler.
     222
     223/** The scheduler
     224 *
     225 * The thread scheduling procedure.
     226 *
    197227 */
    198228void scheduler(void)
     
    238268}
    239269
     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 */
    240278void scheduler_separated_stack(void)
    241279{
     
    366404}
    367405
     406
    368407#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 *
    372415 */
    373416void kcpulb(void *arg)
Note: See TracChangeset for help on using the changeset viewer.