source: GPL/include/linux/sched.h@ 1

Last change on this file since 1 was 1, checked in by vladest, 20 years ago

initial import

File size: 1.7 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
46extern int request_irq(unsigned int,
47 void (*handler)(int, void *, struct pt_regs *),
48 unsigned long, const char *, void *);
49extern void free_irq(unsigned int, void *);
50extern void eoi_irq(unsigned int);
51
52extern unsigned long volatile jiffies;
53
54extern signed long schedule_timeout(signed long timeout);
55
56#endif
Note: See TracBrowser for help on using the repository browser.