Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1185 → Rev 1187

/kernel/trunk/generic/include/proc/scheduler.h
52,14 → 52,12
extern void scheduler(void);
extern void kcpulb(void *arg);
 
extern void before_thread_runs(void);
extern void after_thread_ran(void);
 
extern void sched_print_list(void);
 
/*
* To be defined by architectures:
*/
extern void before_task_runs_arch(void);
extern void before_thread_runs_arch(void);
extern void after_thread_ran_arch(void);
 
/kernel/trunk/generic/include/proc/task.h
52,7 → 52,7
phone_t phones[IPC_MAX_PHONES];
atomic_t active_calls; /**< Active asynchronous messages */
task_arch_t arch;
task_arch_t arch; /**< Architecture specific task data. */
};
 
extern spinlock_t tasks_lock;
/kernel/trunk/generic/src/proc/scheduler.c
47,10 → 47,19
#include <print.h>
#include <debug.h>
 
static void before_task_runs(void);
static void before_thread_runs(void);
static void after_thread_ran(void);
static void scheduler_separated_stack(void);
 
atomic_t nrdy; /**< Number of ready threads in the system. */
 
/** Carry out actions before new task runs. */
void before_task_runs(void)
{
before_task_runs_arch();
}
 
/** Take actions before new thread runs.
*
* Perform actions that need to be
434,6 → 443,7
as_switch(as1, as2);
}
TASK = THREAD->task;
before_task_runs();
}
 
THREAD->state = Running;