[parisc-linux] User space locks -- what's wrong

Carlos O'Donell carlos at systemhalted.org
Mon Jun 12 09:31:24 MDT 2006


On 6/12/06, Grant Grundler <grundler at parisc-linux.org> wrote:
> On Sun, Jun 11, 2006 at 11:13:33PM -0400, Carlos O'Donell wrote:
> > Reading the thread register is a single mfctl, I don't know if that is
> > considered slow?
>
> I believe it depends on the source of the "Move From".
> But I can't find a table with timing info. (e.g. mfctl CR16).

The thread register is CR27, the code to read the value is:

54 static inline struct _pthread_descr_struct * __get_cr27(void)
55 {
56   long cr27;
57   asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
58   return (struct _pthread_descr_struct *) cr27;
59 }

Cheers,
Carlos.



More information about the parisc-linux mailing list