diff --git a/src/header/dl-tls/cbindgen.toml b/src/header/dl-tls/cbindgen.toml new file mode 100644 index 0000000000000000000000000000000000000000..a29e5ec04cfc7b1cdadc13f2f5f60138186c4d28 --- /dev/null +++ b/src/header/dl-tls/cbindgen.toml @@ -0,0 +1,7 @@ +sys_includes = [] +include_guard = "_DL_TLS_H" +language = "C" +style = "Tag" + +[enum] +prefix_with_name = true diff --git a/src/header/dl-tls/mod.rs b/src/header/dl-tls/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..f1a44b6f86936216f8240e50b9cf328b312c23cb --- /dev/null +++ b/src/header/dl-tls/mod.rs @@ -0,0 +1,15 @@ +//! dl-tls implementation for Redox + +use platform::types::*; + +#[repr(C)] +pub struct dl_tls_index { + pub ti_module: u64, + pub ti_offset: u64, +} + +#[no_mangle] +pub extern "C" fn __tls_get_addr(ti: *mut dl_tls_index) -> *mut c_void { + //TODO: Figure out how to implement this + unimplemented!(); +} diff --git a/src/header/mod.rs b/src/header/mod.rs index 34a1eae14634e3c10afb5520694f478c51376041..316433d1afeeda00ddc0e57d8b0c375dcf9915d5 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -5,6 +5,8 @@ pub mod assert; pub mod ctype; pub mod dirent; pub mod dlfcn; +#[path = "dl-tls/mod.rs"] +pub mod dl_tls; pub mod errno; pub mod fcntl; pub mod float;