1pthread_self(3C) Standard C Library Functions pthread_self(3C)
2
3
4
6 pthread_self - get calling thread's ID
7
9 cc -mt [ flag... ] file... -lpthread [ library... ]
10
11 #include <pthread.h>
12
13 pthread_t pthread_self(void);
14
15
17 The pthread_self() function returns the thread ID of the calling
18 thread.
19
21 No errors are defined.
22
24 See attributes(5) for descriptions of the following attributes:
25
26
27
28
29 ┌─────────────────────────────┬─────────────────────────────┐
30 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
31 ├─────────────────────────────┼─────────────────────────────┤
32 │Interface Stability │Standard │
33 ├─────────────────────────────┼─────────────────────────────┤
34 │MT-Level │MT-Safe │
35 └─────────────────────────────┴─────────────────────────────┘
36
38 pthread_create(3C), pthread_equal(3C), attributes(5), standards(5)
39
40
41
42SunOS 5.11 23 Mar 2005 pthread_self(3C)