Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sparc64/include/pcpu.h
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
| extern void *dpcpu0; | extern void *dpcpu0; | ||||
| struct pcb; | struct pcb; | ||||
| struct pcpu; | struct pcpu; | ||||
| register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); | register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); | ||||
| register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); | register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); | ||||
| #define get_pcpu() (pcpup) | |||||
| #define PCPU_GET(member) (pcpup->pc_ ## member) | #define PCPU_GET(member) (pcpup->pc_ ## member) | ||||
| static __inline __pure2 struct thread * | static __inline __pure2 struct thread * | ||||
| __curthread(void) | __curthread(void) | ||||
| { | { | ||||
| struct thread *td; | struct thread *td; | ||||
| __asm("ldx [%" __XSTRING(PCPU_REG) "], %0" : "=r" (td)); | __asm("ldx [%" __XSTRING(PCPU_REG) "], %0" : "=r" (td)); | ||||
| Show All 16 Lines | |||||