Rev | Line | |
---|
[1] | 1 | #ifndef _SCHED_H |
---|
| 2 | #define _SCHED_H 1 |
---|
| 3 | |
---|
| 4 | #include <time.h> |
---|
| 5 | #include <sys/types.h> |
---|
| 6 | |
---|
| 7 | /* |
---|
| 8 | * Scheduling policies |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #define SCHED_RR 0 |
---|
| 12 | #define SCHED_FIFO 1 |
---|
| 13 | #define SCHED_OTHER SCHED_RR |
---|
| 14 | |
---|
| 15 | struct sched_param { |
---|
| 16 | int sched_priority; |
---|
| 17 | }; |
---|
| 18 | |
---|
| 19 | /* END OF COPY form kernel-header */ |
---|
| 20 | int sched_setparam(pid_t pid, const struct sched_param* p); |
---|
| 21 | int sched_getparam(pid_t pid, struct sched_param* p); |
---|
| 22 | int sched_getscheduler(pid_t pid); |
---|
| 23 | int sched_setscheduler(pid_t pid, int policy, const struct sched_param* p); |
---|
| 24 | int sched_yield(void); |
---|
| 25 | int sched_get_priority_max(int policy); |
---|
| 26 | int sched_get_priority_min(int policy); |
---|
| 27 | int sched_rr_get_interval(pid_t pid, struct timespec* tp); |
---|
| 28 | |
---|
| 29 | #endif /* _SCHED_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.