Scheduling Primitives | |
To circumvent real user-level threads and scheduling we support only sane user context states generated by bug-free drivers. The task structure has a new member - dde_sem binary semaphore - and each process could sleep on this until awakened by any event.
This is from kernel/%sched.c | |
int | FASTCALL (wake_up_process(struct task_struct *p)) |
Wake up dedicated user context. | |
signed long | FASTCALL (schedule_timeout(signed long timeout)) |
Schedule process but wake me at least after timeout. | |
void | schedule (void) |
Schedule process. | |
void | FASTCALL (__wake_up(wait_queue_head_t *q, unsigned int mode, int nr)) |
Wake up wait queue entries. | |
void | FASTCALL (__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr)) |
Wake up wait queue entries (sync). | |
void | FASTCALL (interruptible_sleep_on(wait_queue_head_t *q)) |
Sleep on wait queue (interruptible by signals). | |
long | FASTCALL (interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout)) |
Sleep on wait queue (interruptible by signals and timeout). | |
void | FASTCALL (sleep_on(wait_queue_head_t *q)) |
Sleep on wait queue. | |
long | FASTCALL (sleep_on_timeout(wait_queue_head_t *q, long timeout)) |
Sleep on wait queue (interruptible by timeout). | |
void | daemonize (void) |
Put all the gunge required to become a kernel thread without attached user resources in one place where it belongs. | |
Wait Queue - List Manipulation | |
This is from kernel/fork.c | |
void | FASTCALL (add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)) |
Enqueue process in wait queue. | |
void | FASTCALL (add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait)) |
Enqueue process in wait queue (exclusive flag set). | |
void | FASTCALL (remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)) |
Dequeue process from wait queue. | |
Functions | |
task_struct * | get_current () |
Get pointer to current task structure. | |
int | l4dde_process_add_worker () |
Add caller as new process level worker. | |
int | l4dde_process_init () |
Initalize process module. | |
long | kernel_thread (int(*fn)(void *), void *arg, unsigned long flags) |
Create kernel thread. |
It provides one task structure (PCB) per worker (L4-)thread. Functions like schedule(), sleep_on() and wake_up() rely on this. Kernel threads are also implemented here.
Requirements: (additionally to Global Requirements)
|
Put all the gunge required to become a kernel thread without attached user resources in one place where it belongs. (dummy) Definition at line 262 of file sched.c. References DEBUG_MSG. |
|
Get pointer to current task structure. This replaces the "current" macro
Definition at line 61 of file process.c. References _key. |
|
Add caller as new process level worker.
Definition at line 75 of file process.c. References _data, _key, and vmalloc(). Referenced by __start_kernel_thread(), dde_irq_thread(), dde_softirq_thread(), and dde_timer_thread(). |
|
Initalize process module.
Definition at line 109 of file process.c. References _data, _initialized, _key, and vmalloc(). |