Home | History | Annotate | Download | only in stdio

Lines Matching refs:fp

46 #define _EXT(fp) ((struct __sfileext *)((fp)->_ext._base))
47 #define _UB(fp) _EXT(fp)->_ub
48 #define _FLOCK(fp) _EXT(fp)->_lock
50 #define _FILEEXT_INIT(fp) \
52 _UB(fp)._base = NULL; \
53 _UB(fp)._size = 0; \
54 WCIO_INIT(fp); \
55 _FLOCK_INIT(fp); \
58 /* Helper macros to avoid a function call when you know that fp is not NULL.
62 #define _FLOCK_INIT(fp) _FLOCK(fp).value = __PTHREAD_RECURSIVE_MUTEX_INIT_VALUE
63 #define _FLOCK_LOCK(fp) pthread_mutex_lock(&_FLOCK(fp))
64 #define _FLOCK_TRYLOCK(fp) pthread_mutex_trylock(&_FLOCK(fp))
65 #define _FLOCK_UNLOCK(fp) pthread_mutex_unlock(&_FLOCK(fp))