Add unstable interface for getting current thread fd.

This commit is contained in:
4lDO2
2025-03-07 23:51:45 +01:00
parent 779c1e60c5
commit 48df8f5bba
2 changed files with 14 additions and 7 deletions
+6
View File
@@ -363,3 +363,9 @@ pub unsafe extern "C" fn redox_mkns_v1(
syscall::mkns(core::slice::from_raw_parts(names.cast(), num_names))
})())
}
// ABI-UNSTABLE
#[no_mangle]
pub unsafe extern "C" fn redox_cur_thrfd_v0() -> usize {
**redox_rt::RtTcb::current().thread_fd()
}