From c79a31fb36fe265f7566bea622849b06c94b4022 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 11 May 2021 11:08:00 +0200 Subject: nptl: Move stack cache management, __libpthread_freeres into libc This replaces the FREE_P macro with the __nptl_stack_in_use inline function. stack_list_del is renamed to __nptl_stack_list_del, stack_list_add to __nptl_stack_list_add, __deallocate_stack to __nptl_deallocate_stack, free_stacks to __nptl_free_stacks. It is convenient to move __libpthread_freeres into libc at the same time. This removes the temporary __default_pthread_attr_freeres export and restores full freeres coverage for __default_pthread_attr. Reviewed-by: Adhemerval Zanella --- nptl/pthread_create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nptl/pthread_create.c') diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index d19456d..fcaf440 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -228,7 +228,7 @@ __free_tcb (struct pthread *pd) /* Queue the stack memory block for reuse and exit the process. The kernel will signal via writing to the address returned by QUEUE-STACK when the stack is available. */ - __deallocate_stack (pd); + __nptl_deallocate_stack (pd); } } @@ -711,7 +711,7 @@ __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr, futex_wake (&pd->setxid_futex, 1, FUTEX_PRIVATE); /* Free the resources. */ - __deallocate_stack (pd); + __nptl_deallocate_stack (pd); } /* We have to translate error codes. */ -- cgit v1.1