summaryrefslogtreecommitdiff
path: root/lib/libc_r
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-11-30 04:51:57 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-11-30 04:51:57 +0000
commit2528d021fa2c6b78bb8c12c5bd359d80182edf70 (patch)
tree1c8b0b3b59630d02c5ba40c9148c4d6cd31ea596 /lib/libc_r
parent08bfda13559bb98081027a2db224daf7335bbef9 (diff)
set state of new threads using correct macro. This makes debugging a bit easier.
Diffstat (limited to 'lib/libc_r')
-rw-r--r--lib/libc_r/uthread/uthread_create.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c
index 67811b2d583..9fc67e94227 100644
--- a/lib/libc_r/uthread/uthread_create.c
+++ b/lib/libc_r/uthread/uthread_create.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_create.c,v 1.11 1999/11/25 07:01:33 d Exp $ */
+/* $OpenBSD: uthread_create.c,v 1.12 1999/11/30 04:51:56 d Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -173,10 +173,10 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr,
TAILQ_INSERT_HEAD(&_thread_list, new_thread, tle);
if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) {
- new_thread->state = PS_SUSPENDED;
+ PTHREAD_SET_STATE(new_thread, PS_SUSPENDED);
PTHREAD_WAITQ_INSERT(new_thread);
} else {
- new_thread->state = PS_RUNNING;
+ PTHREAD_SET_STATE(new_thread, PS_RUNNING);
PTHREAD_PRIOQ_INSERT_TAIL(new_thread);
}