From e882756311c7b06e59fcc8e582f03852b7dcfd30 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 17 Feb 2011 17:16:20 -0500 Subject: reorganize pthread data structures and move the definitions to alltypes.h this allows sys/types.h to provide the pthread types, as required by POSIX. this design also facilitates forcing ABI-compatible sizes in the arch-specific alltypes.h, while eliminating the need for developers changing the internals of the pthread types to poke around with arch-specific headers they may not be able to test. --- src/thread/pthread_create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/thread/pthread_create.c') diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index af6ccf07..b6c475d0 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -173,8 +173,8 @@ int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo if (!init && ++init) init_threads(); if (!attr) attr = &default_attr; - guard = ROUND(attr->__guardsize + DEFAULT_GUARD_SIZE); - size = guard + ROUND(attr->__stacksize + DEFAULT_STACK_SIZE); + guard = ROUND(attr->_a_guardsize + DEFAULT_GUARD_SIZE); + size = guard + ROUND(attr->_a_stacksize + DEFAULT_STACK_SIZE); size += __pthread_tsd_size; map = mmap(0, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0); if (!map) return EAGAIN; @@ -190,7 +190,7 @@ int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo new->start_arg = arg; new->self = new; new->tsd = (void *)tsd; - new->detached = attr->__detach; + new->detached = attr->_a_detach; new->attr = *attr; memcpy(new->tlsdesc, self->tlsdesc, sizeof new->tlsdesc); new->tlsdesc[1] = (uintptr_t)new; -- cgit v1.2.1