aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-04-26 19:12:56 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-26 19:12:56 -0400
commitb7b3c76a0a21c5a98124e90c47c488f7e4166f87 (patch)
tree475b13a18a81b3ac6377a6c2701e78268f543e5c /include/linux/sched.h
parentf001e47f83db18a9f202f25c0255b4d11ebe468b (diff)
Sanitise linux/sched.h for userspace consumption
There was a whole load of crap exposed which should have been inside the existing #ifdef __KERNEL__ part. Also hide struct sched_param for now, since glibc has its own and doesn't like being given ours (yet). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h76
1 files changed, 37 insertions, 39 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2e05e402df4f..701b8cbceb05 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1,7 +1,44 @@
1#ifndef _LINUX_SCHED_H 1#ifndef _LINUX_SCHED_H
2#define _LINUX_SCHED_H 2#define _LINUX_SCHED_H
3 3
4#include <linux/auxvec.h> /* For AT_VECTOR_SIZE */
5
6/*
7 * cloning flags:
8 */
9#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */
10#define CLONE_VM 0x00000100 /* set if VM shared between processes */
11#define CLONE_FS 0x00000200 /* set if fs info shared between processes */
12#define CLONE_FILES 0x00000400 /* set if open files shared between processes */
13#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
14#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
15#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
16#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
17#define CLONE_THREAD 0x00010000 /* Same thread group? */
18#define CLONE_NEWNS 0x00020000 /* New namespace group? */
19#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
20#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
21#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */
22#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */
23#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
24#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
25#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
26#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
27
28/*
29 * Scheduling policies
30 */
31#define SCHED_NORMAL 0
32#define SCHED_FIFO 1
33#define SCHED_RR 2
34#define SCHED_BATCH 3
35
4#ifdef __KERNEL__ 36#ifdef __KERNEL__
37
38struct sched_param {
39 int sched_priority;
40};
41
5#include <asm/param.h> /* for HZ */ 42#include <asm/param.h> /* for HZ */
6 43
7#include <linux/capability.h> 44#include <linux/capability.h>
@@ -44,35 +81,10 @@
44#include <linux/hrtimer.h> 81#include <linux/hrtimer.h>
45 82
46#include <asm/processor.h> 83#include <asm/processor.h>
47#endif
48
49#include <linux/auxvec.h> /* For AT_VECTOR_SIZE */
50 84
51struct exec_domain; 85struct exec_domain;
52 86
53/* 87/*
54 * cloning flags:
55 */
56#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */
57#define CLONE_VM 0x00000100 /* set if VM shared between processes */
58#define CLONE_FS 0x00000200 /* set if fs info shared between processes */
59#define CLONE_FILES 0x00000400 /* set if open files shared between processes */
60#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
61#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
62#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
63#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
64#define CLONE_THREAD 0x00010000 /* Same thread group? */
65#define CLONE_NEWNS 0x00020000 /* New namespace group? */
66#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
67#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
68#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */
69#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */
70#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
71#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
72#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
73#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
74
75/*
76 * List of flags we want to share for kernel threads, 88 * List of flags we want to share for kernel threads,
77 * if only because they are not used by them anyway. 89 * if only because they are not used by them anyway.
78 */ 90 */
@@ -158,20 +170,6 @@ extern unsigned long nr_iowait(void);
158/* Task command name length */ 170/* Task command name length */
159#define TASK_COMM_LEN 16 171#define TASK_COMM_LEN 16
160 172
161/*
162 * Scheduling policies
163 */
164#define SCHED_NORMAL 0
165#define SCHED_FIFO 1
166#define SCHED_RR 2
167#define SCHED_BATCH 3
168
169struct sched_param {
170 int sched_priority;
171};
172
173#ifdef __KERNEL__
174
175#include <linux/spinlock.h> 173#include <linux/spinlock.h>
176 174
177/* 175/*