Make pthread types opaque, and check against libc.

This commit is contained in:
4lDO2
2023-04-09 16:53:04 +02:00
parent f0d8b6fd31
commit bd6cc20a75
14 changed files with 275 additions and 147 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ impl Drop for MmapGuard {
}
}
pub unsafe fn create(attrs: Option<&pthread_attr_t>, start_routine: extern "C" fn(arg: *mut c_void) -> *mut c_void, arg: *mut c_void) -> Result<pthread_t, Errno> {
pub(crate) unsafe fn create(attrs: Option<&header::RlctAttr>, start_routine: extern "C" fn(arg: *mut c_void) -> *mut c_void, arg: *mut c_void) -> Result<pthread_t, Errno> {
let attrs = attrs.copied().unwrap_or_default();
// Create a locked mutex, unlocked by the thread after it has started.