2018-11-28 00:47:46 +00:00
|
|
|
// use super::varargs::VarArgs;
|
2019-01-23 07:27:13 +00:00
|
|
|
use wasmer_runtime_core::vm::Ctx;
|
2018-11-28 00:47:46 +00:00
|
|
|
|
2019-01-18 06:33:46 +00:00
|
|
|
#[allow(clippy::cast_ptr_alignment)]
|
2019-02-09 21:58:05 +00:00
|
|
|
pub fn _sigemptyset(ctx: &mut Ctx, set: u32) -> i32 {
|
2018-11-28 00:47:46 +00:00
|
|
|
debug!("emscripten::_sigemptyset");
|
2019-01-24 21:04:12 +00:00
|
|
|
let set_addr = emscripten_memory_pointer!(ctx.memory(0), set) as *mut u32;
|
2018-11-29 05:11:36 +00:00
|
|
|
unsafe {
|
|
|
|
*set_addr = 0;
|
|
|
|
}
|
2018-11-28 00:47:46 +00:00
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2019-03-12 21:00:33 +00:00
|
|
|
pub fn _sigaction(_ctx: &mut Ctx, _signum: u32, _act: u32, _oldact: u32) -> i32 {
|
|
|
|
debug!("emscripten::_sigaction {}, {}, {}", _signum, _act, _oldact);
|
2018-11-28 00:47:46 +00:00
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2019-05-28 07:39:49 +00:00
|
|
|
pub fn _siginterrupt(_ctx: &mut Ctx, _a: u32, _b: u32) -> i32 {
|
|
|
|
debug!("emscripten::_siginterrupt {}, {}", _a, _b);
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2019-01-18 06:33:46 +00:00
|
|
|
#[allow(clippy::cast_ptr_alignment)]
|
2019-02-09 21:58:05 +00:00
|
|
|
pub fn _sigaddset(ctx: &mut Ctx, set: u32, signum: u32) -> i32 {
|
2018-12-18 05:54:00 +00:00
|
|
|
debug!("emscripten::_sigaddset {}, {}", set, signum);
|
2019-01-24 21:04:12 +00:00
|
|
|
let set_addr = emscripten_memory_pointer!(ctx.memory(0), set) as *mut u32;
|
2018-11-28 00:47:46 +00:00
|
|
|
unsafe {
|
|
|
|
*set_addr |= 1 << (signum - 1);
|
|
|
|
}
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2019-02-09 21:58:05 +00:00
|
|
|
pub fn _sigsuspend(_ctx: &mut Ctx, _one: i32) -> i32 {
|
2019-01-25 05:58:54 +00:00
|
|
|
debug!("emscripten::_sigsuspend");
|
|
|
|
-1
|
|
|
|
}
|
|
|
|
|
2019-02-09 21:58:05 +00:00
|
|
|
pub fn _sigprocmask(_ctx: &mut Ctx, _one: i32, _two: i32, _three: i32) -> i32 {
|
2018-11-29 06:02:25 +00:00
|
|
|
debug!("emscripten::_sigprocmask");
|
2018-11-28 00:47:46 +00:00
|
|
|
0
|
|
|
|
}
|
2018-12-01 20:12:04 +00:00
|
|
|
|
2019-03-12 21:00:33 +00:00
|
|
|
pub fn _signal(_ctx: &mut Ctx, _sig: u32, _two: i32) -> i32 {
|
|
|
|
debug!("emscripten::_signal ({})", _sig);
|
2018-12-01 20:12:04 +00:00
|
|
|
0
|
|
|
|
}
|