/tmp/l4check/full_tree/trunk/l4/pkg/dde_linux/lib/src/sched.c File Reference

Scheduling. More...

#include <l4/sys/syscalls.h>
#include <l4/thread/thread.h>
#include <l4/semaphore/semaphore.h>
#include <l4/dde_linux/dde.h>
#include <linux/sched.h>
#include "internal.h"
#include "__config.h"
#include "fastcall.h"

Go to the source code of this file.

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

#define SLEEP_ON_VAR
#define SLEEP_ON_HEAD
#define SLEEP_ON_TAIL
static int try_to_wake_up (struct task_struct *p, int synchronous)
 Generic wake up for user contexts.
int FASTCALL (wake_up_process(struct task_struct *p))
 Wake up dedicated user context.
static void process_timeout (unsigned long __data)
 Handle Timeout for schedule_timeout().
signed long FASTCALL (schedule_timeout(signed long timeout))
 Schedule process but wake me at least after timeout.
void schedule (void)
 Schedule process.
static void __wake_up_common (wait_queue_head_t *q, unsigned int mode, int nr_exclusive, const int sync)
 Generic wake up for user contexts in wait queues.
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)
 


Detailed Description

Scheduling.

Date:
08/28/2003
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file sched.c.


Define Documentation

#define SLEEP_ON_HEAD

Value:

wq_write_lock_irqsave(&q->lock,flags); \
        __add_wait_queue(q, &wait);            \
        wq_write_unlock(&q->lock);

Definition at line 211 of file sched.c.

#define SLEEP_ON_TAIL

Value:

wq_write_lock_irq(&q->lock);               \
        __remove_wait_queue(q, &wait);             \
        wq_write_unlock_irqrestore(&q->lock,flags);

Definition at line 216 of file sched.c.

#define SLEEP_ON_VAR

Value:

unsigned long flags;                 \
        wait_queue_t wait;                   \
        init_waitqueue_entry(&wait, current);

Definition at line 206 of file sched.c.


Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden