summaryrefslogtreecommitdiff
path: root/src/thread/pthread_create.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-17 17:16:20 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-17 17:16:20 -0500
commite882756311c7b06e59fcc8e582f03852b7dcfd30 (patch)
treeaead1d2311ed1d3b68dd2b1f02ff6eed2c5ea2ea /src/thread/pthread_create.c
parent4fd159568aa1852fbbe6c11d35ccecaec3715d7c (diff)
downloadmusl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.gz
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.
Diffstat (limited to 'src/thread/pthread_create.c')
-rw-r--r--src/thread/pthread_create.c6
1 files changed, 3 insertions, 3 deletions
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;