summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_np.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librthread/rthread_np.c')
-rw-r--r--lib/librthread/rthread_np.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_np.c b/lib/librthread/rthread_np.c
index cb36095a917..69acbd458e6 100644
--- a/lib/librthread/rthread_np.c
+++ b/lib/librthread/rthread_np.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_np.c,v 1.5 2007/07/08 01:53:46 kurt Exp $ */
+/* $OpenBSD: rthread_np.c,v 1.6 2011/12/28 04:59:31 guenther Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2005 Otto Moerbeek <otto@openbsd.org>
@@ -44,7 +44,7 @@ pthread_set_name_np(pthread_t thread, const char *name)
int
pthread_main_np(void)
{
- return (!_threads_ready || getthrid() == _initial_thread.tid ? 1 : 0);
+ return (!_threads_ready || pthread_self() == &_initial_thread ? 1 : 0);
}