Lines Matching refs:libc
25 raw: UnsafeCell<libc::pthread_mutex_t>,
38 libc::pthread_mutex_destroy(self.raw.get());
67 fn init_raw() -> impl PinInit<UnsafeCell<libc::pthread_mutex_t>, Error> {
68 let init = |slot: *mut UnsafeCell<libc::pthread_mutex_t>| {
70 let slot: *mut libc::pthread_mutex_t = slot.cast();
74 let ret = unsafe { libc::pthread_mutexattr_init(attr) };
80 libc::pthread_mutexattr_settype(attr, libc::PTHREAD_MUTEX_NORMAL)
84 unsafe { libc::pthread_mutexattr_destroy(attr) };
88 unsafe { slot.write(libc::PTHREAD_MUTEX_INITIALIZER) };
90 let ret = unsafe { libc::pthread_mutex_init(slot, attr) };
92 unsafe { libc::pthread_mutexattr_destroy(attr) };
111 unsafe { libc::pthread_mutex_lock(self.raw.get()) };
123 unsafe { libc::pthread_mutex_unlock(self.mtx.raw.get()) };