From c156eacc8b9c6f33f89c7563f2821320be79c2e1 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 1 Jul 2001 14:35:49 +0000 Subject: 2001-07-01 Ross Johnson 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. --- sched.h | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'sched.h') 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 -/* Required by Unix 98 - including sched.h makes time.h available */ +/* Required by Unix 98 */ # include #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 */ + -- cgit v1.2.3