From 47f1f78f509b6aa87741dd06e961642a12f0f55c Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Wed, 22 Nov 2023 21:09:12 +0100 Subject: [PATCH] Update PR to build with the latest versions --- ctru-rs/src/services/ir_user.rs | 3 +-- ctru-sys/src/lib.rs | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ctru-rs/src/services/ir_user.rs b/ctru-rs/src/services/ir_user.rs index 788c02e..7992de9 100644 --- a/ctru-rs/src/services/ir_user.rs +++ b/ctru-rs/src/services/ir_user.rs @@ -7,7 +7,7 @@ use std::ffi::CString; use std::ptr::{slice_from_raw_parts, slice_from_raw_parts_mut}; use std::sync::Mutex; -static IR_USER_ACTIVE: Mutex = Mutex::new(0); +static IR_USER_ACTIVE: Mutex<()> = Mutex::new(()); static IR_USER_STATE: Mutex> = Mutex::new(None); /// The "ir:USER" service. This service is used to talk to IR devices such as @@ -55,7 +55,6 @@ impl IrUser { ) -> crate::Result { let service_reference = ServiceReference::new( &IR_USER_ACTIVE, - false, || unsafe { // Get the ir:USER service handle let mut service_handle = Handle::default(); diff --git a/ctru-sys/src/lib.rs b/ctru-sys/src/lib.rs index f091001..32252e6 100644 --- a/ctru-sys/src/lib.rs +++ b/ctru-sys/src/lib.rs @@ -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 { *__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)]