[PATCH] D32782: Add pthread_self function prototype and make it speculatable.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 16:42:45 PDT 2017


On Sat, May 20, 2017 at 4:31 PM, Davide Italiano via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Just before you revert, I did some investigation and found out that
> when a thread forks the new process will only have one thread.
>
> http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html
>
> So, given it's an entire replica of the original thread possibly it
> also inherits the thread id?
> POSIX doesn't seem to specify so.
>

If you can search in the GCC history and find out where they started
doing it, maybe the commit message/review contains a rationale.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list