diff options
-rw-r--r-- | lib/libc_r/uthread/pthread_private.h | 7 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_attr_setschedparam.c | 10 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_attr_setschedpolicy.c | 6 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_attr_setscope.c | 7 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_join.c | 4 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_setschedparam.c | 6 | ||||
-rw-r--r-- | lib/libpthread/uthread/pthread_private.h | 7 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_attr_setschedparam.c | 10 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_attr_setschedpolicy.c | 6 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_attr_setscope.c | 7 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_join.c | 4 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_setschedparam.c | 6 |
12 files changed, 24 insertions, 56 deletions
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index 8c76cef2ce9..cc9abefa7c6 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread_private.h,v 1.33 2001/12/31 18:23:15 fgsch Exp $ */ +/* $OpenBSD: pthread_private.h,v 1.34 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -62,6 +62,11 @@ #include "uthread_machdep.h" /* + * Workaround until we have ENOTSUP in errno.h + */ +#define ENOTSUP EOPNOTSUPP + +/* * Kernel fatal error handler macro. */ #define PANIC(string) _thread_exit(__FILE__,__LINE__,string) diff --git a/lib/libc_r/uthread/uthread_attr_setschedparam.c b/lib/libc_r/uthread/uthread_attr_setschedparam.c index eb7bda9f92f..d1071fa4314 100644 --- a/lib/libc_r/uthread/uthread_attr_setschedparam.c +++ b/lib/libc_r/uthread/uthread_attr_setschedparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setschedparam.c,v 1.3 2001/08/09 12:00:59 fgsch Exp $ */ +/* $OpenBSD: uthread_attr_setschedparam.c,v 1.4 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -45,19 +45,11 @@ pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; else if (param == NULL) { -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || (param->sched_priority > PTHREAD_MAX_PRIORITY)) { /* Return an unsupported value error. */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else (*attr)->prio = param->sched_priority; diff --git a/lib/libc_r/uthread/uthread_attr_setschedpolicy.c b/lib/libc_r/uthread/uthread_attr_setschedpolicy.c index 8f641181906..59e4ed926d0 100644 --- a/lib/libc_r/uthread/uthread_attr_setschedpolicy.c +++ b/lib/libc_r/uthread/uthread_attr_setschedpolicy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setschedpolicy.c,v 1.3 2001/08/09 12:04:14 fgsch Exp $ */ +/* $OpenBSD: uthread_attr_setschedpolicy.c,v 1.4 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -45,11 +45,7 @@ pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; else if ((policy < SCHED_FIFO) || (policy > SCHED_RR)) { -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else (*attr)->sched_policy = policy; diff --git a/lib/libc_r/uthread/uthread_attr_setscope.c b/lib/libc_r/uthread/uthread_attr_setscope.c index e40b73afcb8..1f6ccac2f7a 100644 --- a/lib/libc_r/uthread/uthread_attr_setscope.c +++ b/lib/libc_r/uthread/uthread_attr_setscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setscope.c,v 1.2 1999/11/25 07:01:32 d Exp $ */ +/* $OpenBSD: uthread_attr_setscope.c,v 1.3 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -50,12 +50,7 @@ pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) else if (contentionscope == PTHREAD_SCOPE_SYSTEM) /* We don't support system wide contention: */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif - else (*attr)->flags |= contentionscope; diff --git a/lib/libc_r/uthread/uthread_join.c b/lib/libc_r/uthread/uthread_join.c index 0167427b570..92fc58cdf12 100644 --- a/lib/libc_r/uthread/uthread_join.c +++ b/lib/libc_r/uthread/uthread_join.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_join.c,v 1.9 2001/12/19 02:02:52 fgsch Exp $ */ +/* $OpenBSD: uthread_join.c,v 1.10 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -114,7 +114,7 @@ pthread_join(pthread_t pthread, void **thread_return) _thread_kern_sig_undefer(); /* Multiple joiners are not supported. */ - ret = EOPNOTSUPP; + ret = ENOTSUP; /* Check if the thread is not dead: */ } else if (pthread->state != PS_DEAD) { diff --git a/lib/libc_r/uthread/uthread_setschedparam.c b/lib/libc_r/uthread/uthread_setschedparam.c index 810c0e1fcc1..438691930b8 100644 --- a/lib/libc_r/uthread/uthread_setschedparam.c +++ b/lib/libc_r/uthread/uthread_setschedparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_setschedparam.c,v 1.4 2002/01/19 23:42:40 fgsch Exp $ */ +/* $OpenBSD: uthread_setschedparam.c,v 1.5 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -49,11 +49,7 @@ pthread_setschedparam(pthread_t pthread, int policy, const struct sched_param *p } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || (param->sched_priority > PTHREAD_MAX_PRIORITY)) { /* Return an unsupported value error. */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif /* Find the thread in the list of active threads: */ } else if ((ret = _find_thread(pthread)) == 0) { diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h index 8c76cef2ce9..cc9abefa7c6 100644 --- a/lib/libpthread/uthread/pthread_private.h +++ b/lib/libpthread/uthread/pthread_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread_private.h,v 1.33 2001/12/31 18:23:15 fgsch Exp $ */ +/* $OpenBSD: pthread_private.h,v 1.34 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -62,6 +62,11 @@ #include "uthread_machdep.h" /* + * Workaround until we have ENOTSUP in errno.h + */ +#define ENOTSUP EOPNOTSUPP + +/* * Kernel fatal error handler macro. */ #define PANIC(string) _thread_exit(__FILE__,__LINE__,string) diff --git a/lib/libpthread/uthread/uthread_attr_setschedparam.c b/lib/libpthread/uthread/uthread_attr_setschedparam.c index eb7bda9f92f..d1071fa4314 100644 --- a/lib/libpthread/uthread/uthread_attr_setschedparam.c +++ b/lib/libpthread/uthread/uthread_attr_setschedparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setschedparam.c,v 1.3 2001/08/09 12:00:59 fgsch Exp $ */ +/* $OpenBSD: uthread_attr_setschedparam.c,v 1.4 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -45,19 +45,11 @@ pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; else if (param == NULL) { -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || (param->sched_priority > PTHREAD_MAX_PRIORITY)) { /* Return an unsupported value error. */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else (*attr)->prio = param->sched_priority; diff --git a/lib/libpthread/uthread/uthread_attr_setschedpolicy.c b/lib/libpthread/uthread/uthread_attr_setschedpolicy.c index 8f641181906..59e4ed926d0 100644 --- a/lib/libpthread/uthread/uthread_attr_setschedpolicy.c +++ b/lib/libpthread/uthread/uthread_attr_setschedpolicy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setschedpolicy.c,v 1.3 2001/08/09 12:04:14 fgsch Exp $ */ +/* $OpenBSD: uthread_attr_setschedpolicy.c,v 1.4 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -45,11 +45,7 @@ pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; else if ((policy < SCHED_FIFO) || (policy > SCHED_RR)) { -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif } else (*attr)->sched_policy = policy; diff --git a/lib/libpthread/uthread/uthread_attr_setscope.c b/lib/libpthread/uthread/uthread_attr_setscope.c index e40b73afcb8..1f6ccac2f7a 100644 --- a/lib/libpthread/uthread/uthread_attr_setscope.c +++ b/lib/libpthread/uthread/uthread_attr_setscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_attr_setscope.c,v 1.2 1999/11/25 07:01:32 d Exp $ */ +/* $OpenBSD: uthread_attr_setscope.c,v 1.3 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -50,12 +50,7 @@ pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) else if (contentionscope == PTHREAD_SCOPE_SYSTEM) /* We don't support system wide contention: */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif - else (*attr)->flags |= contentionscope; diff --git a/lib/libpthread/uthread/uthread_join.c b/lib/libpthread/uthread/uthread_join.c index 0167427b570..92fc58cdf12 100644 --- a/lib/libpthread/uthread/uthread_join.c +++ b/lib/libpthread/uthread/uthread_join.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_join.c,v 1.9 2001/12/19 02:02:52 fgsch Exp $ */ +/* $OpenBSD: uthread_join.c,v 1.10 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -114,7 +114,7 @@ pthread_join(pthread_t pthread, void **thread_return) _thread_kern_sig_undefer(); /* Multiple joiners are not supported. */ - ret = EOPNOTSUPP; + ret = ENOTSUP; /* Check if the thread is not dead: */ } else if (pthread->state != PS_DEAD) { diff --git a/lib/libpthread/uthread/uthread_setschedparam.c b/lib/libpthread/uthread/uthread_setschedparam.c index 810c0e1fcc1..438691930b8 100644 --- a/lib/libpthread/uthread/uthread_setschedparam.c +++ b/lib/libpthread/uthread/uthread_setschedparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_setschedparam.c,v 1.4 2002/01/19 23:42:40 fgsch Exp $ */ +/* $OpenBSD: uthread_setschedparam.c,v 1.5 2002/01/19 23:49:32 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -49,11 +49,7 @@ pthread_setschedparam(pthread_t pthread, int policy, const struct sched_param *p } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || (param->sched_priority > PTHREAD_MAX_PRIORITY)) { /* Return an unsupported value error. */ -#ifdef NOT_YET ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif /* Find the thread in the list of active threads: */ } else if ((ret = _find_thread(pthread)) == 0) { |