1 // Like the compiler, the static analyzer treats some functions differently if
2 // they come from a system header -- for example, pthread_mutex* functions
3 // should not invalidate regions of their arguments.
4 #pragma clang system_header
12 } pthread_mutexattr_t
;
22 typedef pthread_mutex_t lck_mtx_t
;
24 extern void fake_system_function();
25 extern void fake_system_function_that_takes_a_mutex(pthread_mutex_t
*mtx
);
27 extern int pthread_mutex_lock(pthread_mutex_t
*);
28 extern int pthread_mutex_unlock(pthread_mutex_t
*);
29 extern int pthread_mutex_trylock(pthread_mutex_t
*);
30 extern int pthread_mutex_destroy(pthread_mutex_t
*);
31 extern int pthread_mutex_init(pthread_mutex_t
*mutex
, const pthread_mutexattr_t
*mutexattr
);
33 typedef int boolean_t
;
34 extern void lck_mtx_lock(lck_mtx_t
*);
35 extern void lck_mtx_unlock(lck_mtx_t
*);
36 extern boolean_t
lck_mtx_try_lock(lck_mtx_t
*);
37 extern void lck_mtx_destroy(lck_mtx_t
*lck
, lck_grp_t
*grp
);
39 extern void lck_rw_lock_exclusive(lck_rw_t
*lck
);
40 extern void lck_rw_unlock_exclusive(lck_rw_t
*lck
);
41 extern void lck_rw_lock_shared(lck_rw_t
*lck
);
42 extern void lck_rw_unlock_shared(lck_rw_t
*lck
);