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