chiark / gitweb /
[PATCH] fix klibc's broken strlcpy/strlcat
[elogind.git] / klibc / include / sched.h
1 /*
2  * sched.h
3  */
4
5 #ifndef _SCHED_H
6 #define _SCHED_H
7
8 #include <klibc/extern.h>
9
10 /* linux/sched.h is unusable; put the declarations we need here... */
11
12 #define SCHED_NORMAL            0
13 #define SCHED_FIFO              1
14 #define SCHED_RR                2
15
16 struct sched_param {
17   int sched_priority;
18 };
19
20 __extern int sched_setscheduler(pid_t, int, const struct sched_param *);
21 __extern int sched_yield(void);
22
23 /* Raw interfaces to clone(2); only actually usable for non-VM-cloning */
24 #ifdef __ia64__
25 __extern pid_t __clone2(int, void *, void *);
26 static __inline__ pid_t __clone(int _f, void *_sp)
27 {
28   /* If this is used with _sp != 0 it will have the effect of the sp
29      and rsp growing away from a single point in opposite directions. */
30   return __clone2(_f, _sp, _sp);
31 }  
32 #else
33 __extern pid_t __clone(int, void *);
34 #endif
35
36 #endif /* _SCHED_H */