From a5511fa9f431600dbd6dc2b46fc4e6b73e7d239c Mon Sep 17 00:00:00 2001 From: guenther Date: Tue, 5 Sep 2017 02:40:54 +0000 Subject: 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@ --- lib/librthread/rthread_stack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/librthread/rthread_stack.c') diff --git a/lib/librthread/rthread_stack.c b/lib/librthread/rthread_stack.c index 6d3ab3a9b7b..f40ca006c86 100644 --- a/lib/librthread/rthread_stack.c +++ b/lib/librthread/rthread_stack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_stack.c,v 1.16 2016/09/04 10:13:35 akfaew Exp $ */ +/* $OpenBSD: rthread_stack.c,v 1.17 2017/09/05 02:40:54 guenther Exp $ */ /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman */ @@ -33,7 +33,7 @@ _rthread_alloc_stack(pthread_t thread) /* if the request uses the defaults, try to reuse one */ if (thread->attr.stack_addr == NULL && thread->attr.stack_size == RTHREAD_STACK_SIZE_DEF && - thread->attr.guard_size == _rthread_attr_default.guard_size) { + thread->attr.guard_size == _thread_pagesize) { _spinlock(&def_stacks_lock); stack = SLIST_FIRST(&def_stacks); if (stack != NULL) { @@ -123,7 +123,7 @@ void _rthread_free_stack(struct stack *stack) { if (stack->len == RTHREAD_STACK_SIZE_DEF + stack->guardsize && - stack->guardsize == _rthread_attr_default.guard_size) { + stack->guardsize == _thread_pagesize) { _spinlock(&def_stacks_lock); SLIST_INSERT_HEAD(&def_stacks, stack, link); _spinunlock(&def_stacks_lock); -- cgit v1.2.3-59-g8ed1b