summaryrefslogtreecommitdiff
path: root/lib/librthread
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-02-21 01:42:03 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-02-21 01:42:03 +0000
commit75af4f7077e00a3d4154887b6dcc7ff4155f0dfa (patch)
treea7fea79ceaddb94af3a2050c80be7fb71a2bbe2e /lib/librthread
parent23d4c835c870fad1811850ff7a698a2f77d42891 (diff)
Make pthread_suspend_np() and pthread_resume_np() simply fail instead
of doing the Wrong Thing.
Diffstat (limited to 'lib/librthread')
-rw-r--r--lib/librthread/rthread_sched.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/librthread/rthread_sched.c b/lib/librthread/rthread_sched.c
index 07cfdfe9e20..6009e35c84f 100644
--- a/lib/librthread/rthread_sched.c
+++ b/lib/librthread/rthread_sched.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_sched.c,v 1.10 2012/02/19 02:07:48 guenther Exp $ */
+/* $OpenBSD: rthread_sched.c,v 1.11 2012/02/21 01:42:02 guenther Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -136,13 +136,9 @@ pthread_suspend_np(pthread_t thread)
if (thread == pthread_self())
return (EDEADLK);
- /*
- * XXX Avoid a bug in current signal handling by refusing to
- * suspend the main thread.
- */
- if (thread != &_initial_thread)
- if (kill(thread->tid, SIGSTOP) == -1)
- errn = errno;
+
+ /* XXX unimplemented */
+ errn = ENOTSUP;
return (errn);
}
@@ -164,9 +160,8 @@ pthread_resume_np(pthread_t thread)
{
int errn = 0;
- /* XXX check if really suspended? */
- if (kill(thread->tid, SIGCONT) == -1)
- errn = errno;
+ /* XXX unimplemented */
+ errn = ENOTSUP;
return (errn);
}