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. | |
void | yield (void) |
| |
void | __cond_resched (void) |
| |
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 | |
struct 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_remove_worker () |
Remove a caller as 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)
void daemonize | ( | void | ) |
struct task_struct* get_current | ( | ) | [read] |
int l4dde_process_add_worker | ( | ) |
int l4dde_process_init | ( | ) |
Initalize process module.
int l4dde_process_remove_worker | ( | ) |