From 88d12c91ad8ae61cbcb14a2c58334a213d392374 Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Sun, 13 Feb 2022 18:43:00 -0800 Subject: [PATCH] Implement pthread_getprocessorid_np --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7424de0..2741e38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,6 +208,11 @@ pub unsafe extern "C" fn pthread_setschedparam( 0 } +#[no_mangle] +pub unsafe extern "C" fn pthread_getprocessorid_np() -> libc::c_int { + ctru_sys::svcGetProcessorID() +} + /// Internal struct for storing pthread attribute data /// Must be less than or equal to the size of `libc::pthread_attr_t`. We assert /// this below via static_assertions.