source: cmedia/trunk/Include/Linux/sched.h@ 559

Last change on this file since 559 was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 1.7 KB
Line 
1/* $Id: sched.h,v 1.1 2000/04/23 14:55:33 ktk Exp $ */
2
3#ifndef _LINUX_SCHED_H
4#define _LINUX_SCHED_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/* 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
54#endif
Note: See TracBrowser for help on using the repository browser.