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

Xin Tong via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 16:52:19 PDT 2017


I am in middle of something now. I am going to revert it and look at
why GCC does what it does later today.
-Xin

On Sun, May 21, 2017 at 8:42 AM, Davide Italiano <davide at freebsd.org> wrote:
> 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



-- 
Software Engineer - Compiler Toolchain
Employee of Facebook Inc.


More information about the llvm-commits mailing list