Hide internal of pthread_mutex_t.

Bug: 19249079
Change-Id: Iffb79c8d861b698d474f212dc80c638fc2cf1620
This commit is contained in:
Yabin Cui
2015-03-21 15:08:25 -07:00
parent fa3dcecc0f
commit 17393b06ba
4 changed files with 226 additions and 195 deletions

View File

@@ -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)