source: GPL/trunk/include/linux/sched.h@ 424

Last change on this file since 424 was 351, checked in by Paul Smedley, 17 years ago

Add fixes for Via 823x chipsets

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