diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2012-03-22 15:26:05 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2012-03-22 15:26:05 +0000 |
commit | a6f40b7e2b75fc35859c1660f325e2b383af2884 (patch) | |
tree | 58730d51e9ced3b1b1a3f6e8f32252f4c02820df /lib | |
parent | c59f4cc7e8cd9ad9924377405ac25be696718fbf (diff) |
Remove pthread_suspend* and related functions. This is part of the
rthreads major library bump from last night. okay kettenis@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpthread/include/pthread_np.h | 9 | ||||
-rw-r--r-- | lib/librthread/rthread.c | 3 | ||||
-rw-r--r-- | lib/librthread/rthread.h | 3 | ||||
-rw-r--r-- | lib/librthread/rthread_attr.c | 9 | ||||
-rw-r--r-- | lib/librthread/rthread_sched.c | 51 |
5 files changed, 5 insertions, 70 deletions
diff --git a/lib/libpthread/include/pthread_np.h b/lib/libpthread/include/pthread_np.h index 270e377be6e..4b110ac7891 100644 --- a/lib/libpthread/include/pthread_np.h +++ b/lib/libpthread/include/pthread_np.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread_np.h,v 1.9 2006/04/09 02:57:41 krw Exp $ */ +/* $OpenBSD: pthread_np.h,v 1.10 2012/03/22 15:26:04 kurt Exp $ */ /* * Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -43,13 +43,6 @@ typedef void (*pthread_switch_routine_t)(pthread_t, pthread_t); * Non-POSIX thread function prototype definitions: */ __BEGIN_DECLS -int pthread_attr_setcreatesuspend_np(pthread_attr_t *); -int pthread_multi_np(void); -int pthread_resume_np(pthread_t); -void pthread_resume_all_np(void); -int pthread_single_np(void); -int pthread_suspend_np(pthread_t); -void pthread_suspend_all_np(void); int pthread_mutexattr_getkind_np(pthread_mutexattr_t); int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int); void pthread_set_name_np(pthread_t, const char *); diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c index 72224990978..f1ced8f5b94 100644 --- a/lib/librthread/rthread.c +++ b/lib/librthread/rthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.c,v 1.59 2012/03/20 00:47:23 guenther Exp $ */ +/* $OpenBSD: rthread.c,v 1.60 2012/03/22 15:26:04 kurt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -60,7 +60,6 @@ struct pthread_attr _rthread_attr_default = { .sched_policy = SCHED_OTHER, .sched_param = { .sched_priority = 0 }, .sched_inherit = PTHREAD_INHERIT_SCHED, - .create_suspended = 0, #else 0 #endif diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h index bf9748c4aa9..e7f5208d4e4 100644 --- a/lib/librthread/rthread.h +++ b/lib/librthread/rthread.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.h,v 1.36 2012/03/03 10:02:26 guenther Exp $ */ +/* $OpenBSD: rthread.h,v 1.37 2012/03/22 15:26:04 kurt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -100,7 +100,6 @@ struct pthread_attr { int sched_policy; struct sched_param sched_param; int sched_inherit; - int create_suspended; }; #define PTHREAD_MIN_PRIORITY 0 diff --git a/lib/librthread/rthread_attr.c b/lib/librthread/rthread_attr.c index 384893a1d95..05f7f3c1f9c 100644 --- a/lib/librthread/rthread_attr.c +++ b/lib/librthread/rthread_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_attr.c,v 1.18 2012/03/20 04:16:20 guenther Exp $ */ +/* $OpenBSD: rthread_attr.c,v 1.19 2012/03/22 15:26:04 kurt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -190,10 +190,3 @@ pthread_attr_setscope(pthread_attr_t *attrp, int contentionscope) return (0); } -int -pthread_attr_setcreatesuspend_np(pthread_attr_t *attr) -{ - (*attr)->create_suspended = 1; - return (0); -} - diff --git a/lib/librthread/rthread_sched.c b/lib/librthread/rthread_sched.c index 6009e35c84f..2a63e5d3633 100644 --- a/lib/librthread/rthread_sched.c +++ b/lib/librthread/rthread_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sched.c,v 1.11 2012/02/21 01:42:02 guenther Exp $ */ +/* $OpenBSD: rthread_sched.c,v 1.12 2012/03/22 15:26:04 kurt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -129,52 +129,3 @@ pthread_yield(void) sched_yield(); } -int -pthread_suspend_np(pthread_t thread) -{ - int errn = 0; - - if (thread == pthread_self()) - return (EDEADLK); - - /* XXX unimplemented */ - errn = ENOTSUP; - return (errn); -} - -void -pthread_suspend_all_np(void) -{ - pthread_t t; - pthread_t self = pthread_self(); - - _spinlock(&_thread_lock); - LIST_FOREACH(t, &_thread_list, threads) - if (t != self) - pthread_suspend_np(t); - _spinunlock(&_thread_lock); -} - -int -pthread_resume_np(pthread_t thread) -{ - int errn = 0; - - /* XXX unimplemented */ - errn = ENOTSUP; - return (errn); -} - -void -pthread_resume_all_np(void) -{ - pthread_t t; - pthread_t self = pthread_self(); - - _spinlock(&_thread_lock); - LIST_FOREACH(t, &_thread_list, threads) - if (t != self) - pthread_resume_np(t); - _spinunlock(&_thread_lock); -} - |