Skip to contentSkip to conversation

Efficient Pthread Implementation

parisc-linux Cary Coutant 1 participant 1 message Mar 20, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

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