diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-22 13:57:02 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-22 13:57:02 -0400 |
commit | 0109d950e685f1c5f6cef245a8b1bc47c9b6d94c (patch) | |
tree | a4048fa32a9e4337e524e0323cc5cc2e9ce8367d /src/thread/pthread_attr_get.c | |
parent | c4dd0c98bae8e3583f68ba5b30db491055ab2322 (diff) | |
download | musl-0109d950e685f1c5f6cef245a8b1bc47c9b6d94c.tar.gz musl-0109d950e685f1c5f6cef245a8b1bc47c9b6d94c.tar.bz2 musl-0109d950e685f1c5f6cef245a8b1bc47c9b6d94c.tar.xz musl-0109d950e685f1c5f6cef245a8b1bc47c9b6d94c.zip |
make pthread attribute types structs, even when they just have one field
this change is to get the right tags for C++ ABI matching. it should
have no other effects.
Diffstat (limited to 'src/thread/pthread_attr_get.c')
-rw-r--r-- | src/thread/pthread_attr_get.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c index ad913c5a..03fc91e3 100644 --- a/src/thread/pthread_attr_get.c +++ b/src/thread/pthread_attr_get.c @@ -52,19 +52,19 @@ int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int *restrict pshared) { - *pshared = !!*a; + *pshared = !!a->__attr; return 0; } int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk) { - *clk = *a & 0x7fffffff; + *clk = a->__attr & 0x7fffffff; return 0; } int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restrict pshared) { - *pshared = *a>>31; + *pshared = a->__attr>>31; return 0; } @@ -75,24 +75,24 @@ int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *re } int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared) { - *pshared = *a>>31; + *pshared = a->__attr>>31; return 0; } int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *restrict robust) { - *robust = *a / 4U % 2; + *robust = a->__attr / 4U % 2; return 0; } int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type) { - *type = *a & 3; + *type = a->__attr & 3; return 0; } int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *restrict pshared) { - *pshared = *(int *)a; + *pshared = a->__attr[0]; return 0; } |