diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h index bc9fe0813d7c..9eb8efba0170 100644 --- a/sys/ia64/include/pcpu.h +++ b/sys/ia64/include/pcpu.h @@ -70,6 +70,16 @@ struct pcpu; register struct pcpu *pcpup __asm__("r13"); +static __inline struct thread * +__curthread(void) +{ + struct thread *td; + + __asm __volatile("ld8.acq %0=[r13]" : "=r"(td)); + return (td); +} +#define curthread (__curthread()) + #define PCPU_GET(member) (pcpup->pc_ ## member) /*