To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

condvar_rtmu.rs 1.52 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use super::*;

#[cfg(target_os = "linux")]
use super::condvar_rtmu_linux::*;

type CondVar = SysCondVar;

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_new() -> Address {
    let res = Address::from_mut_ptr(CondVar::new());
    trace!("muentry_condvar_new returning {}", res);
    res
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_delete(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_delete of condvar:\n{}", cd);
    cd.delete();
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_acq_lock(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_acq_lock of condvar:\n{}", cd);
    cd.acq_lock();
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_rel_lock(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_rel_lock of condvar:\n{}", cd);
    cd.rel_lock();
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_wait(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_wait of condvar:\n{}", cd);
    cd.wait();
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_signal(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_signal of condvar:\n{}", cd);
    cd.signal();
}

#[no_mangle]
pub unsafe extern "C" fn muentry_condvar_broadcast(cv_addr: Address) {
    let cd: &mut CondVar = cv_addr.to_ref_mut();
    trace!("muentry_condvar_broadcast of condvar:\n{}", cd);
    cd.broadcast();
}