1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _@GUARD_PREFIX@_SCHED_H
18
19 #if __GNUC__ >= 3
20 @PRAGMA_SYSTEM_HEADER@
21 #endif
22 @PRAGMA_COLUMNS@
23
24
25 #if @HAVE_SCHED_H@
26 # if @HAVE_SYS_CDEFS_H@
27 # include <sys/cdefs.h>
28 # endif
29 # @INCLUDE_NEXT@ @NEXT_SCHED_H@
30 #endif
31
32 #ifndef _@GUARD_PREFIX@_SCHED_H
33 #define _@GUARD_PREFIX@_SCHED_H
34
35
36
37
38
39 #include <sys/types.h>
40
41 #ifdef __KLIBC__
42
43 # include <spawn.h>
44 #endif
45
46 #ifdef __VMS
47
48 # include <pthread.h>
49 #endif
50
51
52
53
54
55 #if !@HAVE_STRUCT_SCHED_PARAM@
56
57 # if !GNULIB_defined_struct_sched_param
58 struct sched_param
59 {
60 int sched_priority;
61 };
62 # define GNULIB_defined_struct_sched_param 1
63 # endif
64
65 #endif
66
67 #if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER)
68 # define SCHED_FIFO 1
69 # define SCHED_RR 2
70 # define SCHED_OTHER 0
71 #endif
72
73 #if @GNULIB_SCHED_YIELD@
74 # if @REPLACE_SCHED_YIELD@
75 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
76 # undef sched_yield
77 # define sched_yield rpl_sched_yield
78 # endif
79 _GL_FUNCDECL_RPL (sched_yield, int, (void));
80 _GL_CXXALIAS_RPL (sched_yield, int, (void));
81 # else
82 # if !@HAVE_SCHED_YIELD@
83 _GL_FUNCDECL_SYS (sched_yield, int, (void));
84 # endif
85 _GL_CXXALIAS_SYS (sched_yield, int, (void));
86 # endif
87 # if __GLIBC__ >= 2
88 _GL_CXXALIASWARN (sched_yield);
89 # endif
90 #elif defined GNULIB_POSIXCHECK
91 # undef sched_yield
92 # if HAVE_RAW_DECL_SCHED_YIELD
93 _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - "
94 "use gnulib module sched_yield for portability");
95 # endif
96 #endif
97
98 #endif
99 #endif