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

Last change on this file since 276 was 211, checked in by Brendan Oakley, 18 years ago

Debug improvements and misc cleanup

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
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
16struct 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
30void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
31void add_wait_queue_exclusive(wait_queue_head_t *q);
32void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
33
34extern void __wake_up(wait_queue_head_t *q, unsigned int mode);
35extern void sleep_on(wait_queue_head_t *q);
36extern long sleep_on_timeout(wait_queue_head_t *q,
37 signed long timeout);
38extern void interruptible_sleep_on(wait_queue_head_t *q);
39extern long interruptible_sleep_on_timeout(wait_queue_head_t *q,
40 signed long timeout);
41extern 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
46void schedule(void);
47
48// 12 Jun 07 SHL Drop superfluous near
49extern int request_irq(unsigned int,
50 int (*handler)(int, void *, struct pt_regs *),
51 unsigned long, const char *, void *);
52extern void free_irq(unsigned int, void *);
53extern void eoi_irq(unsigned int);
54
55extern unsigned long volatile jiffies;
56
57extern signed long schedule_timeout(signed long timeout);
58
59static 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 */
Note: See TracBrowser for help on using the repository browser.