[PATCH] D32782: Add pthread_self function prototype and make it speculatable.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 20 13:13:10 PDT 2017
trentxintong added a comment.
BTW, GCC moves pthread_self out of the loop on Linux. so I would think this is legal on linux. Unless GCC handles pthread_self differently on different platforms, I think this would be fine.
Also, if you read this carefully http://h20564.www2.hpe.com/hpsc/doc/public/display?docId=emr_na-c02267692&lang=en-us&cc=us
Its saying the "thread ID returned is the same ID that is returned in the thread parameter to the creating thread at thread creation time", basically implying the thread ID returned by pthread_self stays the same
https://reviews.llvm.org/D32782
More information about the llvm-commits
mailing list