summaryrefslogtreecommitdiff
path: root/sched.h
diff options
context:
space:
mode:
authorrpj <rpj>2001-07-01 14:35:49 +0000
committerrpj <rpj>2001-07-01 14:35:49 +0000
commitc156eacc8b9c6f33f89c7563f2821320be79c2e1 (patch)
treee43c9e4dcfc56577e2dac01c39d4a10ea91c5dc4 /sched.h
parent19299847fdd32094b28377db1aea61b0f605dc8b (diff)
2001-07-01 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
Contributed by - Alexander Terekhov. * condvar.c: Fixed lost signal bug reported by Timur Aydin (taydin@snet.net). [RPJ (me) didn't translate the original algorithm correctly.] * semaphore.c: Added sem_post_multiple; this is a useful routine, but it doesn't appear to be standard. For now it's not an exported function.
Diffstat (limited to 'sched.h')
-rw-r--r--sched.h31
1 files changed, 7 insertions, 24 deletions
diff --git a/sched.h b/sched.h
index e4e02a2..870087f 100644
--- a/sched.h
+++ b/sched.h
@@ -28,37 +28,17 @@
#ifndef _SCHED_H
#define _SCHED_H
-#if !defined( PTW32_HEADER )
-#define PTW32_HEADER
-
-#ifdef _UWIN
-# define HAVE_STRUCT_TIMESPEC 1
-# define HAVE_SIGNAL_H 1
-# undef HAVE_CONFIG_H
-# pragma comment(lib, "pthread")
-#endif
-
-#endif /* PTW32_HEADER */
-
#if defined(__MINGW32__) || defined(_UWIN)
/* For pid_t */
# include <sys/types.h>
-/* Required by Unix 98 - including sched.h makes time.h available */
+/* Required by Unix 98 */
# include <time.h>
#else
-typedef DWORD pid_t;
+typedef int pid_t;
#endif
-#if ! defined(HAVE_STRUCT_TIMESPEC) && ! defined(PTW32_TIMESPEC)
-#define PTW32_TIMESPEC
-struct timespec {
- long tv_sec;
- long tv_nsec;
-};
-#endif /* HAVE_STRUCT_TIMESPEC */
-
-
/* Thread scheduling policies */
+
enum {
SCHED_OTHER = 0,
SCHED_FIFO,
@@ -86,7 +66,9 @@ int sched_setscheduler (pid_t pid, int policy);
int sched_getscheduler (pid_t pid);
-int sched_rr_get_interval(pid_t pid, struct timespec * interval);
+#define sched_rr_get_interval(_pid, _interval) \
+ ( errno = ENOSYS, (int) -1 )
+
#ifdef __cplusplus
} /* End of extern "C" */
@@ -94,3 +76,4 @@ int sched_rr_get_interval(pid_t pid, struct timespec * interval);
#endif /* !_SCHED_H */
+