X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_rwlock_init.c;h=a2c0b478c78cf36ef7f15e4d65956e517c647221;hb=37cd1676395e5ebdae3f372bf59d4fef54be9818;hp=f87d566c46ae3f760dc63d1d24f6ce19a087d800;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/thread/pthread_rwlock_init.c b/src/thread/pthread_rwlock_init.c index f87d566c..a2c0b478 100644 --- a/src/thread/pthread_rwlock_init.c +++ b/src/thread/pthread_rwlock_init.c @@ -1,9 +1,8 @@ #include "pthread_impl.h" -int pthread_rwlock_init(pthread_rwlock_t *rw, const pthread_rwlockattr_t *a) +int pthread_rwlock_init(pthread_rwlock_t *restrict rw, const pthread_rwlockattr_t *restrict a) { - memset(rw, 0, sizeof *rw); - if (a) { - } + *rw = (pthread_rwlock_t){0}; + if (a) rw->_rw_shared = a->__attr[0]*128; return 0; }