diff --git a/src/condvar.rs b/src/condvar.rs index acf8b02..4d94a31 100644 --- a/src/condvar.rs +++ b/src/condvar.rs @@ -1,7 +1,5 @@ //! PThread condition variables implemented using libctru. -pub fn init() {} - #[no_mangle] pub unsafe extern "C" fn pthread_cond_init( cond: *mut libc::pthread_cond_t, diff --git a/src/lib.rs b/src/lib.rs index dc719d7..28046e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,18 +8,3 @@ mod mutex; mod rwlock; mod thread; mod thread_keys; - -/// Call this somewhere to force Rust to link this module. -/// The call doesn't need to execute, just exist. -/// -/// See -#[inline(always)] -pub fn init() { - condvar::init(); - misc::init(); - mutex::init(); - rwlock::init(); - thread::init(); - thread::attr::init(); - thread_keys::init(); -} diff --git a/src/misc.rs b/src/misc.rs index 100daae..1ff9ba0 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -1,7 +1,5 @@ //! Miscellaneous pthread functions -pub fn init() {} - #[no_mangle] pub unsafe extern "C" fn sched_yield() -> libc::c_int { ctru_sys::svcSleepThread(0); diff --git a/src/mutex.rs b/src/mutex.rs index 2d8dc41..568cb6e 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -1,7 +1,5 @@ //! PThread mutex implemented using libctru. -pub fn init() {} - #[no_mangle] pub unsafe extern "C" fn pthread_mutexattr_init( _attr: *mut libc::pthread_mutexattr_t, diff --git a/src/rwlock.rs b/src/rwlock.rs index e3fc48a..365e960 100644 --- a/src/rwlock.rs +++ b/src/rwlock.rs @@ -1,7 +1,5 @@ //! PThread read-write lock implemented using libctru. -pub fn init() {} - use crate::{condvar, mutex}; struct rwlock_clear { diff --git a/src/thread.rs b/src/thread.rs index a00b301..01f2550 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -8,8 +8,6 @@ use std::sync::atomic::{AtomicUsize, Ordering}; pub mod attr; -pub fn init() {} - /// The main thread's pthread ID const MAIN_THREAD_ID: libc::pthread_t = 0; diff --git a/src/thread/attr.rs b/src/thread/attr.rs index 039283c..b445ddb 100644 --- a/src/thread/attr.rs +++ b/src/thread/attr.rs @@ -1,8 +1,6 @@ use static_assertions::const_assert; use std::mem; -pub fn init() {} - /// 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. diff --git a/src/thread_keys.rs b/src/thread_keys.rs index 1deb9d1..5486d4e 100644 --- a/src/thread_keys.rs +++ b/src/thread_keys.rs @@ -4,8 +4,6 @@ use spin::rwlock::RwLock; use std::collections::BTreeMap; use std::sync::atomic::{AtomicUsize, Ordering}; -pub fn init() {} - type Key = usize; type Destructor = unsafe extern "C" fn(*mut libc::c_void);