Lines Matching refs:libc
23 raw: UnsafeCell<libc::pthread_mutex_t>,
36 libc::pthread_mutex_destroy(self.raw.get()); in drop()
63 fn init_raw() -> impl PinInit<UnsafeCell<libc::pthread_mutex_t>, Error> { in new()
64 let init = |slot: *mut UnsafeCell<libc::pthread_mutex_t>| { in new()
66 let slot: *mut libc::pthread_mutex_t = slot.cast(); in new()
70 let ret = unsafe { libc::pthread_mutexattr_init(attr) }; in new()
76 libc::pthread_mutexattr_settype(attr, libc::PTHREAD_MUTEX_NORMAL) in new()
80 unsafe { libc::pthread_mutexattr_destroy(attr) }; in new()
84 unsafe { slot.write(libc::PTHREAD_MUTEX_INITIALIZER) }; in new()
86 let ret = unsafe { libc::pthread_mutex_init(slot, attr) }; in new()
88 unsafe { libc::pthread_mutexattr_destroy(attr) }; in new()
106 unsafe { libc::pthread_mutex_lock(self.raw.get()) }; in lock()
118 unsafe { libc::pthread_mutex_unlock(self.mtx.raw.get()) }; in drop()