summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_create.c
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2001-12-08 14:51:36 +0000
committerfgsch <fgsch@openbsd.org>2001-12-08 14:51:36 +0000
commit6ac0f2e9f3ee24fce17e680ea1180cafb1eb927f (patch)
tree2065bacd309ad7857cf9e749ef1ef895538d91be /lib/libpthread/uthread/uthread_create.c
parentstyle: Use queue.h macro's for list traversal, convert several (&thing)->foo (diff)
downloadwireguard-openbsd-6ac0f2e9f3ee24fce17e680ea1180cafb1eb927f.tar.xz
wireguard-openbsd-6ac0f2e9f3ee24fce17e680ea1180cafb1eb927f.zip
Partially sync with FreeBSD; mostly pthread_cancel(3) related changes.
make includes is needed in case you want to play.
Diffstat (limited to 'lib/libpthread/uthread/uthread_create.c')
-rw-r--r--lib/libpthread/uthread/uthread_create.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_create.c b/lib/libpthread/uthread/uthread_create.c
index 82606872c1d..5b1897b7ef4 100644
--- a/lib/libpthread/uthread/uthread_create.c
+++ b/lib/libpthread/uthread/uthread_create.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_create.c,v 1.15 2001/08/21 19:24:53 fgsch Exp $ */
+/* $OpenBSD: uthread_create.c,v 1.16 2001/12/08 14:51:36 fgsch Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -93,8 +93,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->stack = stack;
new_thread->start_routine = start_routine;
new_thread->arg = arg;
- new_thread->cancelstate = PTHREAD_CANCEL_ENABLE;
- new_thread->canceltype = PTHREAD_CANCEL_DEFERRED;
+ new_thread->cancelflags = PTHREAD_CANCEL_ENABLE |
+ PTHREAD_CANCEL_DEFERRED;
/*
* Write a magic value to the thread structure
@@ -152,6 +152,7 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->flags = 0;
new_thread->poll_data.nfds = 0;
new_thread->poll_data.fds = NULL;
+ new_thread->continuation = NULL;
/*
* Defer signals to protect the scheduling queues