From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/thread/id.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/rustix/src/thread/id.rs (limited to 'vendor/rustix/src/thread/id.rs') diff --git a/vendor/rustix/src/thread/id.rs b/vendor/rustix/src/thread/id.rs new file mode 100644 index 000000000..964d2654c --- /dev/null +++ b/vendor/rustix/src/thread/id.rs @@ -0,0 +1,17 @@ +use crate::imp; +use crate::process::Pid; + +/// `gettid()`—Returns the thread ID. +/// +/// This returns the OS thread ID, which is not necessarily the same as the +/// `rust::thread::Thread::id` or the pthread ID. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/gettid.2.html +#[inline] +#[must_use] +pub fn gettid() -> Pid { + imp::thread::syscalls::gettid() +} -- cgit v1.2.3