00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _XENO_POSIX_SCHED_H
00020 #define _XENO_POSIX_SCHED_H
00021
00022 #if defined(__KERNEL__) || defined(__XENO_SIM__)
00023
00024 #include <nucleus/xenomai.h>
00025
00026 #ifdef __KERNEL__
00027 #include <linux/sched.h>
00028 #endif
00029
00030 #ifdef __XENO_SIM__
00031 #include <posix_overrides.h>
00032 #define SCHED_FIFO 1
00033 #define SCHED_RR 2
00034 #endif
00035
00036 #define SCHED_OTHER 0
00037
00038 struct timespec;
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044 int sched_yield(void);
00045
00046 int sched_get_priority_min(int policy);
00047
00048 int sched_get_priority_max(int policy);
00049
00050 int sched_rr_get_interval(int pid, struct timespec *interval);
00051
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055
00056 #else
00057
00058 #include_next <sched.h>
00059
00060 int __real_sched_yield(void);
00061
00062 #endif
00063
00064 #ifndef __sched_extensions_defined
00065 #define __sched_extensions_defined
00066
00067 #ifndef SCHED_SPORADIC
00068 #define SCHED_SPORADIC 10
00069 #define sched_ss_low_priority ss.__sched_low_priority
00070 #define sched_ss_repl_period ss.__sched_repl_period
00071 #define sched_ss_init_budget ss.__sched_init_budget
00072 #define sched_ss_max_repl ss.__sched_max_repl
00073 #endif
00074
00075 struct __sched_ss_param {
00076 int __sched_low_priority;
00077 struct timespec __sched_repl_period;
00078 struct timespec __sched_init_budget;
00079 int __sched_max_repl;
00080 };
00081
00082 struct sched_param_ex {
00083 int sched_priority;
00084 struct __sched_ss_param ss;
00085 };
00086
00087 #endif
00088
00089 #endif