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

Last change on this file since 209 was 130, checked in by stevenhl, 18 years ago

Make a bunch of warnings go away

File size: 1.9 KB
Line 
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
14struct 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
28void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
29void add_wait_queue_exclusive(wait_queue_head_t *q);
30void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
31
32extern void __wake_up(wait_queue_head_t *q, unsigned int mode);
33extern void sleep_on(wait_queue_head_t *q);
34extern long sleep_on_timeout(wait_queue_head_t *q,
35 signed long timeout);
36extern void interruptible_sleep_on(wait_queue_head_t *q);
37extern long interruptible_sleep_on_timeout(wait_queue_head_t *q,
38 signed long timeout);
39extern 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
44void schedule(void);
45
46// 12 Jun 07 SHL Drop superfluous near
47extern int request_irq(unsigned int,
48 int (*handler)(int, void *, struct pt_regs *),
49 unsigned long, const char *, void *);
50extern void free_irq(unsigned int, void *);
51extern void eoi_irq(unsigned int);
52
53extern unsigned long volatile jiffies;
54
55extern signed long schedule_timeout(signed long timeout);
56
57static inline int signal_pending(struct task_struct *p)
58{
59#ifdef DEBUG
60 dprintf(("signal_pending always returns 0"));
61#endif /* DEBUG */
62 return 0;
63}
64
65#endif /* _LINUX_SCHED_H */
Note: See TracBrowser for help on using the repository browser.