|
|
|
@ -4,8 +4,6 @@
@@ -4,8 +4,6 @@
|
|
|
|
|
#![allow(non_snake_case)] |
|
|
|
|
#![allow(clippy::all)] |
|
|
|
|
|
|
|
|
|
use core::arch::asm; |
|
|
|
|
|
|
|
|
|
pub mod result; |
|
|
|
|
pub use result::*; |
|
|
|
|
|
|
|
|
@ -17,16 +15,6 @@ pub unsafe fn errno() -> s32 {
@@ -17,16 +15,6 @@ pub unsafe fn errno() -> s32 {
|
|
|
|
|
*__errno() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub unsafe fn getThreadLocalStorage() -> *mut libc::c_void { |
|
|
|
|
let return_value: *mut libc::c_void; |
|
|
|
|
asm!("mrc p15, 0, {}, c13, c0, 3", out(reg) return_value); |
|
|
|
|
return_value |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub unsafe fn getThreadCommandBuffer() -> *mut u32 { |
|
|
|
|
(getThreadLocalStorage() as *mut u8).add(0x80) as *mut u32 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: not sure if there's a better way to do this, but I have gotten myself
|
|
|
|
|
// with this a couple times so having the hint seems nice to have.
|
|
|
|
|
#[cfg(test)] |
|
|
|
|