[parisc-linux] Efficient Pthread Implementation

Cary Coutant cary@cup.hp.com
Tue, 20 Mar 2001 12:02:41 -0800


>I propose we could use %cr27.
>It's readable from userspace, and we could have a 2-insn stub on the
>gateway page which sets %cr27 as necessary.  We then have to switch its
>value across context switch, which doesn't seem like a big deal to me.

This is what HP-UX does. We provide a lightweight system call for setting 
it. I believe that we recommend reading it at most once per procedure and 
caching it in a GR, because of the latency reading from a CR.

-cary