1b8a62b91Sopenharmony_ciuse crate::backend; 2b8a62b91Sopenharmony_ciuse crate::process::Pid; 3b8a62b91Sopenharmony_ci 4b8a62b91Sopenharmony_ci/// `gettid()`—Returns the thread ID. 5b8a62b91Sopenharmony_ci/// 6b8a62b91Sopenharmony_ci/// This returns the OS thread ID, which is not necessarily the same as the 7b8a62b91Sopenharmony_ci/// `rust::thread::Thread::id` or the pthread ID. 8b8a62b91Sopenharmony_ci/// 9b8a62b91Sopenharmony_ci/// # References 10b8a62b91Sopenharmony_ci/// - [Linux] 11b8a62b91Sopenharmony_ci/// 12b8a62b91Sopenharmony_ci/// [Linux]: https://man7.org/linux/man-pages/man2/gettid.2.html 13b8a62b91Sopenharmony_ci#[inline] 14b8a62b91Sopenharmony_ci#[must_use] 15b8a62b91Sopenharmony_cipub fn gettid() -> Pid { 16b8a62b91Sopenharmony_ci backend::thread::syscalls::gettid() 17b8a62b91Sopenharmony_ci} 18