diff options
author | jhb <jhb@FreeBSD.org> | 2010-07-29 18:44:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-07-29 18:44:10 +0000 |
commit | 007376c918adfea0ab81ac43b33dc3f8297b4e6e (patch) | |
tree | ca3924e0572a2a29f202c1fdbe307006a9bf6eed /sys/ia64/include | |
parent | 32773dc6ee3f0d5e900ca06397917b0542c56d12 (diff) | |
download | FreeBSD-src-007376c918adfea0ab81ac43b33dc3f8297b4e6e.zip FreeBSD-src-007376c918adfea0ab81ac43b33dc3f8297b4e6e.tar.gz |
Mark the __curthread() functions as __pure2 and remove the volatile keyword
from the inline assembly. This allows the compiler to cache invocations of
curthread since it's value does not change within a thread context.
Submitted by: zec (i386)
MFC after: 1 week
Diffstat (limited to 'sys/ia64/include')
-rw-r--r-- | sys/ia64/include/pcpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h index 3c6e6a7..58403aa 100644 --- a/sys/ia64/include/pcpu.h +++ b/sys/ia64/include/pcpu.h @@ -70,12 +70,12 @@ struct pcpu; register struct pcpu *pcpup __asm__("r13"); -static __inline struct thread * +static __inline __pure2 struct thread * __curthread(void) { struct thread *td; - __asm __volatile("ld8.acq %0=[r13]" : "=r"(td)); + __asm("ld8.acq %0=[r13]" : "=r"(td)); return (td); } #define curthread (__curthread()) |