diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-05 02:40:56 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-05 02:40:56 +0000 |
commit | cccbd286e927a6a92e8f7231e57ddd17a243314f (patch) | |
tree | 41eff3ba3c242fab3369fa5a3338b606e3212e48 /lib/librthread/rthread_np.c | |
parent | 1fb8297ae3c4f75c7a5d87d15fc92ba8fa2cbbdc (diff) |
Move mutex, condvar, and thread-specific data routes, pthread_once, and
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.
Requested by libressl team. Ports testing by naddy@
ok kettenis@
Diffstat (limited to 'lib/librthread/rthread_np.c')
-rw-r--r-- | lib/librthread/rthread_np.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/librthread/rthread_np.c b/lib/librthread/rthread_np.c index d8a78110358..86beb501068 100644 --- a/lib/librthread/rthread_np.c +++ b/lib/librthread/rthread_np.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_np.c,v 1.19 2016/05/07 19:05:22 guenther Exp $ */ +/* $OpenBSD: rthread_np.c,v 1.20 2017/09/05 02:40:54 guenther Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * Copyright (c) 2005 Otto Moerbeek <otto@openbsd.org> @@ -80,6 +80,9 @@ pthread_stackseg_np(pthread_t thread, stack_t *sinfo) static struct rlimit rl; static int gotself; + if (!_threads_ready) /* for ROUND_TO_PAGE */ + _rthread_init(); + if (gotself == 0) { int mib[2]; size_t len; |