Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/include/counter.h
Show All 32 Lines | |||||
#include <sys/pcpu.h> | #include <sys/pcpu.h> | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#endif | #endif | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
extern struct pcpu __pcpu[]; | |||||
#define EARLY_COUNTER &__pcpu[0].pc_early_dummy_counter | #define EARLY_COUNTER &__pcpu[0].pc_early_dummy_counter | ||||
#define counter_enter() do { \ | #define counter_enter() do { \ | ||||
if ((cpu_feature & CPUID_CX8) == 0) \ | if ((cpu_feature & CPUID_CX8) == 0) \ | ||||
critical_enter(); \ | critical_enter(); \ | ||||
} while (0) | } while (0) | ||||
#define counter_exit() do { \ | #define counter_exit() do { \ | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |