pthread_self.c: mention gettid

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-12-03 00:00:00 +00:00
parent 7b74328603
commit 2f5cd56506

View File

@@ -29,6 +29,10 @@
* .... * ....
* *
* Note how the PID is the same for all threads. * Note how the PID is the same for all threads.
*
* There is then a Linux specific gettid which returns a really unique thread ID:
* https://stackoverflow.com/questions/9305992/if-threads-share-the-same-pid-how-can-they-be-identified#comment42637433_9306150
* man gettid says that this value is different than pthread_self.
*/ */
#define _XOPEN_SOURCE 700 #define _XOPEN_SOURCE 700