projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix unused variable warnings in new nextafter/nexttoward code
[musl]
/
src
/
thread
/
pthread_create.c
diff --git
a/src/thread/pthread_create.c
b/src/thread/pthread_create.c
index
d84e50a
..
917be54
100644
(file)
--- a/
src/thread/pthread_create.c
+++ b/
src/thread/pthread_create.c
@@
-46,8
+46,6
@@
void pthread_exit(void *result)
void __do_cleanup_push(struct __ptcb *cb, void (*f)(void *), void *x)
{
struct pthread *self = pthread_self();
void __do_cleanup_push(struct __ptcb *cb, void (*f)(void *), void *x)
{
struct pthread *self = pthread_self();
- cb->__f = f;
- cb->__x = x;
cb->__next = self->cancelbuf;
self->cancelbuf = cb;
}
cb->__next = self->cancelbuf;
self->cancelbuf = cb;
}
@@
-106,7
+104,7
@@
int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo
size = guard + ROUND(attr->_a_stacksize + DEFAULT_STACK_SIZE);
}
size += __pthread_tsd_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);
+ map = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
if (map == MAP_FAILED) return EAGAIN;
if (guard) mprotect(map, guard, PROT_NONE);
if (map == MAP_FAILED) return EAGAIN;
if (guard) mprotect(map, guard, PROT_NONE);
@@
-122,6
+120,7
@@
int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo
new->tsd = (void *)tsd;
if (attr) new->detached = attr->_a_detach;
new->unblock_cancel = self->cancel;
new->tsd = (void *)tsd;
if (attr) new->detached = attr->_a_detach;
new->unblock_cancel = self->cancel;
+ new->canary = self->canary ^ (uintptr_t)&new;
stack = (void *)new;
__synccall_lock();
stack = (void *)new;
__synccall_lock();