Add typed functions and weird type parameter things

This commit is contained in:
Lachlan Sneff
2019-02-02 15:28:50 -08:00
parent 6c33aa5803
commit eba66f3b33
24 changed files with 706 additions and 463 deletions

View File

@ -2,7 +2,7 @@
use wasmer_runtime_core::vm::Ctx;
#[allow(clippy::cast_ptr_alignment)]
pub extern "C" fn _sigemptyset(set: u32, ctx: &mut Ctx) -> i32 {
pub fn _sigemptyset(set: u32, ctx: &mut Ctx) -> i32 {
debug!("emscripten::_sigemptyset");
let set_addr = emscripten_memory_pointer!(ctx.memory(0), set) as *mut u32;
unsafe {
@ -11,13 +11,13 @@ pub extern "C" fn _sigemptyset(set: u32, ctx: &mut Ctx) -> i32 {
0
}
pub extern "C" fn _sigaction(signum: u32, act: u32, oldact: u32, _ctx: &mut Ctx) -> i32 {
pub fn _sigaction(signum: u32, act: u32, oldact: u32, _ctx: &mut Ctx) -> i32 {
debug!("emscripten::_sigaction {}, {}, {}", signum, act, oldact);
0
}
#[allow(clippy::cast_ptr_alignment)]
pub extern "C" fn _sigaddset(set: u32, signum: u32, ctx: &mut Ctx) -> i32 {
pub fn _sigaddset(set: u32, signum: u32, ctx: &mut Ctx) -> i32 {
debug!("emscripten::_sigaddset {}, {}", set, signum);
let set_addr = emscripten_memory_pointer!(ctx.memory(0), set) as *mut u32;
unsafe {
@ -26,17 +26,17 @@ pub extern "C" fn _sigaddset(set: u32, signum: u32, ctx: &mut Ctx) -> i32 {
0
}
pub extern "C" fn _sigsuspend(_one: i32, _ctx: &mut Ctx) -> i32 {
pub fn _sigsuspend(_one: i32, _ctx: &mut Ctx) -> i32 {
debug!("emscripten::_sigsuspend");
-1
}
pub extern "C" fn _sigprocmask(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
pub fn _sigprocmask(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
debug!("emscripten::_sigprocmask");
0
}
pub extern "C" fn _signal(sig: u32, _two: i32, _ctx: &mut Ctx) -> i32 {
pub fn _signal(sig: u32, _two: i32, _ctx: &mut Ctx) -> i32 {
debug!("emscripten::_signal ({})", sig);
0
}