2018-11-28 01:47:46 +01:00
|
|
|
// use super::varargs::VarArgs;
|
|
|
|
use crate::webassembly::Instance;
|
|
|
|
|
2018-11-29 00:11:36 -05:00
|
|
|
pub extern "C" fn _sigemptyset(set: u32, instance: &mut Instance) -> i32 {
|
2018-11-28 01:47:46 +01:00
|
|
|
debug!("emscripten::_sigemptyset");
|
2018-11-29 00:11:36 -05:00
|
|
|
let set_addr = instance.memory_offset_addr(0, set as _) as *mut u32;
|
|
|
|
unsafe {
|
|
|
|
*set_addr = 0;
|
|
|
|
}
|
2018-11-28 01:47:46 +01:00
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:11:36 -05:00
|
|
|
pub extern "C" fn _sigaction(_signum: u32, _act: u32, _oldact: u32, _instance: &mut Instance) -> i32 {
|
2018-11-28 01:47:46 +01:00
|
|
|
debug!("emscripten::_sigaction");
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
|
|
|
pub extern "C" fn _sigaddset(set: u32, signum: u32, instance: &mut Instance) -> i32 {
|
2018-11-28 22:02:25 -08:00
|
|
|
debug!("emscripten::_sigaddset");
|
2018-11-28 01:47:46 +01:00
|
|
|
let set_addr = instance.memory_offset_addr(0, set as _) as *mut u32;
|
|
|
|
unsafe {
|
|
|
|
*set_addr |= 1 << (signum - 1);
|
|
|
|
}
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
|
|
|
pub extern "C" fn _sigprocmask() -> i32 {
|
2018-11-28 22:02:25 -08:00
|
|
|
debug!("emscripten::_sigprocmask");
|
2018-11-28 01:47:46 +01:00
|
|
|
0
|
|
|
|
}
|