| 1 | #ifndef _LINUX_SCHED_H | 
|---|
| 2 | #define _LINUX_SCHED_H | 
|---|
| 3 |  | 
|---|
| 4 | #include <asm/param.h>  /* for HZ */ | 
|---|
| 5 |  | 
|---|
| 6 | #define TASK_RUNNING            0 | 
|---|
| 7 | #define TASK_INTERRUPTIBLE      1 | 
|---|
| 8 | #define TASK_UNINTERRUPTIBLE    2 | 
|---|
| 9 | #define TASK_ZOMBIE             4 | 
|---|
| 10 | #define TASK_STOPPED            8 | 
|---|
| 11 | #define TASK_SWAPPING           16 | 
|---|
| 12 | #define TASK_EXCLUSIVE          32 | 
|---|
| 13 |  | 
|---|
| 14 | struct task_struct { | 
|---|
| 15 | /* these are hardcoded - don't touch */ | 
|---|
| 16 | long state;    /* -1 unrunnable, 0 runnable, >0 stopped */ | 
|---|
| 17 | unsigned long flags;    /* per process flags, defined below */ | 
|---|
| 18 | int sigpending; | 
|---|
| 19 | unsigned long pid; | 
|---|
| 20 | char comm[16]; | 
|---|
| 21 | /* open file information */ | 
|---|
| 22 | struct files_struct *files; | 
|---|
| 23 | }; | 
|---|
| 24 |  | 
|---|
| 25 | #include <asm\current.h> | 
|---|
| 26 | #include <linux\wait.h> | 
|---|
| 27 |  | 
|---|
| 28 | void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait); | 
|---|
| 29 | void add_wait_queue_exclusive(wait_queue_head_t *q); | 
|---|
| 30 | void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait); | 
|---|
| 31 |  | 
|---|
| 32 | extern void __wake_up(wait_queue_head_t *q, unsigned int mode); | 
|---|
| 33 | extern void sleep_on(wait_queue_head_t *q); | 
|---|
| 34 | extern long sleep_on_timeout(wait_queue_head_t *q, | 
|---|
| 35 | signed long timeout); | 
|---|
| 36 | extern void interruptible_sleep_on(wait_queue_head_t *q); | 
|---|
| 37 | extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, | 
|---|
| 38 | signed long timeout); | 
|---|
| 39 | extern void wake_up_process(struct task_struct * tsk); | 
|---|
| 40 |  | 
|---|
| 41 | #define wake_up(x)                      __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE) | 
|---|
| 42 | #define wake_up_interruptible(x)        __wake_up((x),TASK_INTERRUPTIBLE) | 
|---|
| 43 |  | 
|---|
| 44 | void schedule(void); | 
|---|
| 45 |  | 
|---|
| 46 | extern int request_irq(unsigned int, | 
|---|
| 47 | int (near *handler)(int, void *, struct pt_regs *), | 
|---|
| 48 | unsigned long, const char *, void *); | 
|---|
| 49 | extern void free_irq(unsigned int, void *); | 
|---|
| 50 | extern void eoi_irq(unsigned int); | 
|---|
| 51 |  | 
|---|
| 52 | extern unsigned long volatile jiffies; | 
|---|
| 53 |  | 
|---|
| 54 | extern signed long schedule_timeout(signed long timeout); | 
|---|
| 55 |  | 
|---|
| 56 | #endif | 
|---|