Fix pthread_barrierattr_getpshared prototype.

As http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_barrierattr_getpshared.html
is my witness, there's a missing `const` here.

Change-Id: Ifd68188fb952460b64d144bdc21a53bc40ed82a7
This commit is contained in:
Elliott Hughes 2016-08-11 23:18:13 -07:00
parent 166f875eab
commit 02ac028bf7
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) {
return 0;
}
int pthread_barrierattr_getpshared(pthread_barrierattr_t* attr, int* pshared) {
int pthread_barrierattr_getpshared(const pthread_barrierattr_t* attr, int* pshared) {
*pshared = (*attr & 1) ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE;
return 0;
}

View file

@ -232,8 +232,8 @@ int pthread_rwlock_wrlock(pthread_rwlock_t* _Nonnull);
int pthread_barrierattr_init(pthread_barrierattr_t* _Nonnull attr) __INTRODUCED_IN(24);
int pthread_barrierattr_destroy(pthread_barrierattr_t* _Nonnull attr) __INTRODUCED_IN(24);
int pthread_barrierattr_getpshared(pthread_barrierattr_t* _Nonnull attr, int* _Nonnull pshared)
__INTRODUCED_IN(24);
int pthread_barrierattr_getpshared(const pthread_barrierattr_t* _Nonnull attr,
int* _Nonnull pshared) __INTRODUCED_IN(24);
int pthread_barrierattr_setpshared(pthread_barrierattr_t* _Nonnull attr, int pshared)
__INTRODUCED_IN(24);