ソースを参照

Add dl-tls.h, required for shared libraries

Jeremy Soller 6 年 前
コミット
d5eb1e2732
3 ファイル変更24 行追加0 行削除
  1. 7 0
      src/header/dl-tls/cbindgen.toml
  2. 15 0
      src/header/dl-tls/mod.rs
  3. 2 0
      src/header/mod.rs

+ 7 - 0
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

+ 15 - 0
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!();
+}

+ 2 - 0
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;