diff options
author | 1999-11-26 00:53:21 +0000 | |
---|---|---|
committer | 1999-11-26 00:53:21 +0000 | |
commit | d603bfd7b8e934359195f7efa2565fe8695fe341 (patch) | |
tree | f74e11a6392b7fd077c3720c7c6eb690bc9c305f /lib/libpthread | |
parent | Build libperl with the other libs (diff) | |
download | wireguard-openbsd-d603bfd7b8e934359195f7efa2565fe8695fe341.tar.xz wireguard-openbsd-d603bfd7b8e934359195f7efa2565fe8695fe341.zip |
don't use stack cache if user supplied the storage
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_stack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_stack.c b/lib/libpthread/uthread/uthread_stack.c index 43cbf7cc519..4cc69718111 100644 --- a/lib/libpthread/uthread/uthread_stack.c +++ b/lib/libpthread/uthread/uthread_stack.c @@ -1,4 +1,5 @@ -/* $OpenBSD: uthread_stack.c,v 1.2 1999/11/25 19:00:19 deraadt Exp $ */ +/* $OpenBSD: uthread_stack.c,v 1.3 1999/11/26 00:53:21 d Exp $ */ +/* David Leonard <david.leonard@csee.uq.edu.au> 1999. /* * Thread stack allocation. @@ -28,7 +29,7 @@ _thread_stack_alloc(base, size) int nbpg = getpagesize(); /* Maintain a queue of default-sized stacks that we can re-use. */ - if (size == PTHREAD_STACK_DEFAULT) { + if (base == NULL && size == PTHREAD_STACK_DEFAULT) { if (pthread_mutex_lock(&_gc_mutex) != 0) PANIC("Cannot lock gc mutex"); |