Add needed functions for acid to link.

This commit is contained in:
4lDO2
2023-03-05 18:28:56 +01:00
parent 2593101ea7
commit 6a658bc33d
13 changed files with 268 additions and 175 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ pub unsafe extern "C" fn pthread_rwlock_rdlock(rwlock: *mut pthread_rwlock_t) ->
#[no_mangle]
pub unsafe extern "C" fn pthread_rwlock_timedrdlock(rwlock: *mut pthread_rwlock_t, timeout: *const timespec) -> c_int {
let rwlock: &pthread_rwlock_t = &*rwlock;
let timeout = NonNull::new(timeout as *mut _).map(|n| n.as_ref());
let timeout = timeout.as_ref();
loop {
if pthread_rwlock_tryrdlock(rwlock as *const _ as *mut _) == EBUSY {
@@ -58,7 +58,7 @@ pub unsafe extern "C" fn pthread_rwlock_timedrdlock(rwlock: *mut pthread_rwlock_
#[no_mangle]
pub unsafe extern "C" fn pthread_rwlock_timedwrlock(rwlock: *mut pthread_rwlock_t, timeout: *const timespec) -> c_int {
let rwlock: &pthread_rwlock_t = &*rwlock;
let timeout = NonNull::new(timeout as *mut _).map(|n| n.as_ref());
let timeout = timeout.as_ref();
loop {
if pthread_rwlock_trywrlock(rwlock as *const _ as *mut _) == EBUSY {