• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use libc::{self, pthread_t};
2 
3 pub type Pthread = pthread_t;
4 
5 /// Obtain ID of the calling thread (see
6 /// [`pthread_self(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_self.html)
7 ///
8 /// The thread ID returned by `pthread_self()` is not the same thing as
9 /// the kernel thread ID returned by a call to `gettid(2)`.
10 #[inline]
pthread_self() -> Pthread11 pub fn pthread_self() -> Pthread {
12     unsafe { libc::pthread_self() }
13 }
14