Browse Source

Merge pull request #15 from Meziu/fix/link-errors

Fix link errors by using inlining
pull/16/head
Meziu 3 years ago committed by GitHub
parent
commit
1907d9a0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/lib.rs
  2. 6
      src/thread.rs

2
src/lib.rs

@ -15,11 +15,13 @@ mod thread_keys; @@ -15,11 +15,13 @@ mod thread_keys;
/// The call doesn't need to execute, just exist.
///
/// See https://github.com/rust-lang/rust/issues/47384
#[inline(always)]
pub fn init() {
condvar::init();
misc::init();
mutex::init();
rwlock::init();
thread::init();
thread::attr::init();
thread_keys::init();
}

6
src/thread.rs

@ -6,11 +6,9 @@ use std::collections::BTreeMap; @@ -6,11 +6,9 @@ use std::collections::BTreeMap;
use std::ptr;
use std::sync::atomic::{AtomicUsize, Ordering};
mod attr;
pub mod attr;
pub fn init() {
attr::init();
}
pub fn init() {}
/// The main thread's pthread ID
const MAIN_THREAD_ID: libc::pthread_t = 0;

Loading…
Cancel
Save