X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_attr_init.c;h=463a8d20751256fccce53af7ae6925de7fc1e9ff;hb=7b384c42b73ca1a1e150b3f255990ec53cedec60;hp=d91bf157408e6ead53284b25697c19f7f5a0f2f3;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/thread/pthread_attr_init.c b/src/thread/pthread_attr_init.c index d91bf157..463a8d20 100644 --- a/src/thread/pthread_attr_init.c +++ b/src/thread/pthread_attr_init.c @@ -2,6 +2,10 @@ int pthread_attr_init(pthread_attr_t *a) { - memset(a, 0, sizeof *a); + *a = (pthread_attr_t){0}; + __acquire_ptc(); + a->_a_stacksize = __default_stacksize; + a->_a_guardsize = __default_guardsize; + __release_ptc(); return 0; }