Subversion Repositories HelenOS-historic

Rev

Rev 1115 | Rev 1196 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1115 Rev 1187
Line 45... Line 45...
45
#include <typedefs.h>
45
#include <typedefs.h>
46
#include <cpu.h>
46
#include <cpu.h>
47
#include <print.h>
47
#include <print.h>
48
#include <debug.h>
48
#include <debug.h>
49
 
49
 
-
 
50
static void before_task_runs(void);
-
 
51
static void before_thread_runs(void);
-
 
52
static void after_thread_ran(void);
50
static void scheduler_separated_stack(void);
53
static void scheduler_separated_stack(void);
51
 
54
 
52
atomic_t nrdy;  /**< Number of ready threads in the system. */
55
atomic_t nrdy;  /**< Number of ready threads in the system. */
53
 
56
 
-
 
57
/** Carry out actions before new task runs. */
-
 
58
void before_task_runs(void)
-
 
59
{
-
 
60
    before_task_runs_arch();
-
 
61
}
-
 
62
 
54
/** Take actions before new thread runs.
63
/** Take actions before new thread runs.
55
 *
64
 *
56
 * Perform actions that need to be
65
 * Perform actions that need to be
57
 * taken before the newly selected
66
 * taken before the newly selected
58
 * tread is passed control.
67
 * tread is passed control.
Line 432... Line 441...
432
             * Replace the old one with the new one.
441
             * Replace the old one with the new one.
433
             */
442
             */
434
            as_switch(as1, as2);
443
            as_switch(as1, as2);
435
        }
444
        }
436
        TASK = THREAD->task;
445
        TASK = THREAD->task;
-
 
446
        before_task_runs();
437
    }
447
    }
438
 
448
 
439
    THREAD->state = Running;
449
    THREAD->state = Running;
440
 
450
 
441
#ifdef SCHEDULER_VERBOSE
451
#ifdef SCHEDULER_VERBOSE