diff options
author | Andrzej Janik <[email protected]> | 2021-04-09 22:00:23 +0200 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2021-04-09 22:00:23 +0200 |
commit | 8393dbd6e963ee59161dbbe3447a876156bea1c3 (patch) | |
tree | 66f462e7a61110e12b7455ada47b111c46ba7d7f /zluda_dump/src | |
parent | 9dcfb45aa2e8e970712e7207798c46236c9cf884 (diff) | |
download | ZLUDA-8393dbd6e963ee59161dbbe3447a876156bea1c3.tar.gz ZLUDA-8393dbd6e963ee59161dbbe3447a876156bea1c3.zip |
More fixes for 32bit
Diffstat (limited to 'zluda_dump/src')
-rw-r--r-- | zluda_dump/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zluda_dump/src/lib.rs b/zluda_dump/src/lib.rs index c6b1322..9b9146d 100644 --- a/zluda_dump/src/lib.rs +++ b/zluda_dump/src/lib.rs @@ -27,14 +27,14 @@ mod os; macro_rules! extern_redirect { (pub fn $fn_name:ident ( $($arg_id:ident: $arg_type:ty),* $(,)? ) -> $ret_type:ty ;) => { #[no_mangle] - pub extern "stdcall" fn $fn_name ( $( $arg_id : $arg_type),* ) -> $ret_type { + pub extern "system" fn $fn_name ( $( $arg_id : $arg_type),* ) -> $ret_type { unsafe { $crate::init_libcuda_handle() }; let name = std::ffi::CString::new(stringify!($fn_name)).unwrap(); let fn_ptr = unsafe { crate::os::get_proc_address($crate::LIBCUDA_HANDLE, &name) }; if fn_ptr == std::ptr::null_mut() { return CUresult::CUDA_ERROR_UNKNOWN; } - let typed_fn = unsafe { std::mem::transmute::<_, fn( $( $arg_id : $arg_type),* ) -> $ret_type>(fn_ptr) }; + let typed_fn = unsafe { std::mem::transmute::<_, extern "system" fn( $( $arg_id : $arg_type),* ) -> $ret_type>(fn_ptr) }; typed_fn($( $arg_id ),*) } }; @@ -46,7 +46,7 @@ macro_rules! extern_redirect_with { $receiver:path ; ) => { #[no_mangle] - pub extern "stdcall" fn $fn_name ( $( $arg_id : $arg_type),* ) -> $ret_type { + pub extern "system" fn $fn_name ( $( $arg_id : $arg_type),* ) -> $ret_type { unsafe { $crate::init_libcuda_handle() }; let continuation = |$( $arg_id : $arg_type),* | { let name = std::ffi::CString::new(stringify!($fn_name)).unwrap(); @@ -54,7 +54,7 @@ macro_rules! extern_redirect_with { if fn_ptr == std::ptr::null_mut() { return CUresult::CUDA_ERROR_UNKNOWN; } - let typed_fn = unsafe { std::mem::transmute::<_, fn( $( $arg_id : $arg_type),* ) -> $ret_type>(fn_ptr) }; + let typed_fn = unsafe { std::mem::transmute::<_, extern "system" fn( $( $arg_id : $arg_type),* ) -> $ret_type>(fn_ptr) }; typed_fn($( $arg_id ),*) }; unsafe { $receiver($( $arg_id ),* , continuation) } @@ -511,7 +511,7 @@ const CUDART_INTERFACE_GUID: CUuuid = CUuuid { const GET_MODULE_OFFSET: usize = 6; static mut CUDART_INTERFACE_VTABLE: Vec<*const c_void> = Vec::new(); static mut ORIGINAL_GET_MODULE_FROM_CUBIN: Option< - unsafe extern "C" fn( + unsafe extern "system" fn( result: *mut CUmodule, fatbinc_wrapper: *const FatbincWrapper, ptr1: *mut c_void, @@ -598,7 +598,7 @@ struct FatbinFileHeader { uncompressed_payload: c_ulong, } -unsafe extern "C" fn get_module_from_cubin( +unsafe extern "system" fn get_module_from_cubin( module: *mut CUmodule, fatbinc_wrapper: *const FatbincWrapper, ptr1: *mut c_void, |