summaryrefslogtreecommitdiff
path: root/PACE/pace/sched.h
blob: 083e3a3f05dc9f52d9b0741fa01cb34cf7bd530e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/sched.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_SCHED_H
#define PACE_SCHED_H

#include "pace/config/defines.h"

#if (PACE_HAS_POSIX)
# include "pace/posix/sched.h"
#elif (PACE_VXWORKS)
# include "pace/vxworks/sched.h"
#elif (PACE_WIN32)
# include "pace/win32/sched.h"
#endif

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

  /**
     PACE's implementation of the POSIX function sched_get_priority_max.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.6.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_get_priority_max (int policy);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_get_priority_min.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.6.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_get_priority_min (int policy);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_getparam.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.2.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_getparam (pace_pid_t pid,
                                       pace_sched_param * param);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_rr_get_interval.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.6.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_rr_get_interval (pace_pid_t pid,
                                              pace_timespec * interval);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_setparam.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.1.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_setparam (pace_pid_t pid,
                                       const pace_sched_param * param);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_getscheduler.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.4.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_getscheduler (pace_pid_t pid);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_setscheduler.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.3.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_setscheduler (pace_pid_t pid,
                                           int policy,
                                           const pace_sched_param * param);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sched_yield.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 13.3.5.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sched_yield ();
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if defined (PACE_HAS_INLINE)
#  if (PACE_HAS_POSIX)
#    include "pace/posix/sched.inl"
#  elif (PACE_VXWORKS)
#    include "pace/vxworks/sched.inl"
#  elif (PACE_WIN32)
#    include "pace/win32/sched.inl"
#  endif
#endif /* PACE_HAS_INLINE */

#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */

#endif /* PACE_SCHED_H */