diff options
| author | rmind <rmind@NetBSD.org> | 2008-01-26 17:55:29 +0000 |
|---|---|---|
| committer | rmind <rmind@NetBSD.org> | 2008-01-26 17:55:29 +0000 |
| commit | b5e9addd22eabcce2e017947a3b5e8569ca6500a (patch) | |
| tree | 3dd6e6289a1458aafa08984cba5c0c1f18ae4180 /lib/libpthread/pthread.h | |
| parent | ef515ac1dc49cc036e4437a2a8dbf89d538707fe (diff) | |
sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used. Reported by <drochner>.
Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;
Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;
Diffstat (limited to 'lib/libpthread/pthread.h')
| -rw-r--r-- | lib/libpthread/pthread.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libpthread/pthread.h b/lib/libpthread/pthread.h index 05e07f1e4e8..4ad7360dde7 100644 --- a/lib/libpthread/pthread.h +++ b/lib/libpthread/pthread.h @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.h,v 1.27 2008/01/19 16:05:34 christos Exp $ */ +/* $NetBSD: pthread.h,v 1.28 2008/01/26 17:55:30 rmind Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,9 +44,6 @@ #include <time.h> /* For timespec */ #include <sched.h> #include <sys/featuretest.h> -#ifdef _NETBSD_SOURCE -#include <sys/pset.h> -#endif #include <pthread_types.h> @@ -190,13 +187,14 @@ int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_getschedparam(pthread_t, int * __restrict, struct sched_param * __restrict); int pthread_setschedparam(pthread_t, int, const struct sched_param *); -int pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); -int pthread_setaffinity_np(pthread_t, size_t, cpuset_t *); int pthread_setschedprio(pthread_t, int); int *pthread__errno(void); #if defined(_NETBSD_SOURCE) +int pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); +int pthread_setaffinity_np(pthread_t, size_t, cpuset_t *); + int pthread_mutex_held_np(pthread_mutex_t *); pthread_t pthread_mutex_owner_np(pthread_mutex_t *); |
