Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/include/counter.h
| Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | __asm __volatile("\n" | ||||
| "bne- 1b" | "bne- 1b" | ||||
| : "=&b" (ccpu), "=&r" (old) | : "=&b" (ccpu), "=&r" (old) | ||||
| : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) | : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) | ||||
| : "cr0", "memory"); | : "cr0", "memory"); | ||||
| } | } | ||||
| #else /* !64bit */ | #else /* !64bit */ | ||||
| #include <sys/systm.h> | |||||
| #define counter_enter() critical_enter() | #define counter_enter() critical_enter() | ||||
| #define counter_exit() critical_exit() | #define counter_exit() critical_exit() | ||||
| #ifdef IN_SUBR_COUNTER_C | #ifdef IN_SUBR_COUNTER_C | ||||
| /* XXXKIB non-atomic 64bit read */ | /* XXXKIB non-atomic 64bit read */ | ||||
| static inline uint64_t | static inline uint64_t | ||||
| counter_u64_read_one(uint64_t *p, int cpu) | counter_u64_read_one(uint64_t *p, int cpu) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||