[PATCHv2] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB

Steven Munroe munroesj@linux.vnet.ibm.com
Thu Aug 27 20:51:00 GMT 2015


On Thu, 2015-08-27 at 22:26 +0200, Torvald Riegel wrote:
> On Thu, 2015-08-27 at 15:06 -0500, Steven Munroe wrote:
> > QED a Clone syscall is effectively a full barrier (Sequentially
> > Consistent) between stores in the thread parent and loads in the thread
> > child.
> 
> Note that it would have to affect stores in the child too (ie, child
> stores overwrite parent stores that happened before the syscall), and
> loads in the parent shouldn't be able to read from stores in the child
> either.
> I guess that's the case because the OS should execute a full barrier on
> syscalls, and will use an acquire barrier or similar after getting the
> OK to start a new thread and before actually executing the thread?
> 
That is all in the kernel code.

In this specific case only the parent (main()) thread will write the
static variables __tcb_hwcap, __tcb_platform and __tcb_hwcap_init,
before any children are created. And child threads will only read from
these variables (to copy to the TCB). 

This is not the general cased for shared static storage and I make
specific claims beyond this case.



More information about the Libc-alpha mailing list