diff options
author | jb <jb@FreeBSD.org> | 1998-03-08 02:37:27 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-03-08 02:37:27 +0000 |
commit | 696d96607ea72f5593229da8cb8f40be06d70427 (patch) | |
tree | 11d92a68c70afe8f085ae80a06a86fe472a5ffea /lib/libpthread/thread/thr_private.h | |
parent | a9db70095236e5101eded25a70a4a51af368b856 (diff) | |
download | FreeBSD-src-696d96607ea72f5593229da8cb8f40be06d70427.zip FreeBSD-src-696d96607ea72f5593229da8cb8f40be06d70427.tar.gz |
Add sched_yield() witch is the draft 10 equivalent of pthread_yield()
from draft 4. Move some of the schedule definitions to sched.h which
is a POSIX header.
Diffstat (limited to 'lib/libpthread/thread/thr_private.h')
-rw-r--r-- | lib/libpthread/thread/thr_private.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index e0a0511..7d5bf89 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -52,6 +52,7 @@ #include <signal.h> #include <sys/types.h> #include <sys/time.h> +#include <sched.h> /* * Kernel fatal error handler macro. @@ -158,30 +159,15 @@ struct pthread_cleanup { void *routine_arg; }; -/* - * Scheduling definitions. - */ -enum schedparam_policy { - SCHED_RR, - SCHED_IO, - SCHED_FIFO, - SCHED_OTHER -}; - struct pthread_attr { - enum schedparam_policy schedparam_policy; - int prio; - int suspend; - int flags; - void *arg_attr; - void (*cleanup_attr) (); - void *stackaddr_attr; - size_t stacksize_attr; -}; - -struct sched_param { + int schedparam_policy; int prio; - void *no_data; + int suspend; + int flags; + void *arg_attr; + void (*cleanup_attr) (); + void *stackaddr_attr; + size_t stacksize_attr; }; /* |