diff options
author | Yabin Cui <yabinc@google.com> | 2015-03-21 15:08:25 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-03-25 17:54:17 -0700 |
commit | 17393b06bab9cb3e95d0f466a56c746de19b8eee (patch) | |
tree | fa260e58da8fe186bca7787e3d7645a86b2f79cb /libc/stdio/fileext.h | |
parent | fa3dcecc0fd7bbbf04234e41be690a5d33277870 (diff) | |
download | android_bionic-17393b06bab9cb3e95d0f466a56c746de19b8eee.tar.gz android_bionic-17393b06bab9cb3e95d0f466a56c746de19b8eee.tar.bz2 android_bionic-17393b06bab9cb3e95d0f466a56c746de19b8eee.zip |
Hide internal of pthread_mutex_t.
Bug: 19249079
Change-Id: Iffb79c8d861b698d474f212dc80c638fc2cf1620
Diffstat (limited to 'libc/stdio/fileext.h')
-rw-r--r-- | libc/stdio/fileext.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libc/stdio/fileext.h b/libc/stdio/fileext.h index 209815aee..6cacc0f84 100644 --- a/libc/stdio/fileext.h +++ b/libc/stdio/fileext.h @@ -61,7 +61,11 @@ do { \ _UB(fp)._base = NULL; \ _UB(fp)._size = 0; \ WCIO_INIT(fp); \ - _FLOCK(fp).value = __PTHREAD_RECURSIVE_MUTEX_INIT_VALUE; \ + pthread_mutexattr_t attr; \ + pthread_mutexattr_init(&attr); \ + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \ + pthread_mutex_init(&_FLOCK(fp), &attr); \ + pthread_mutexattr_destroy(&attr); \ _EXT(fp)->_stdio_handles_locking = true; \ } while (0) |