Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/pcpu.h
Show All 37 Lines | |||||
#endif | #endif | ||||
#include <sys/_cpuset.h> | #include <sys/_cpuset.h> | ||||
#include <sys/_lock.h> | #include <sys/_lock.h> | ||||
#include <sys/_mutex.h> | #include <sys/_mutex.h> | ||||
#include <sys/_sx.h> | #include <sys/_sx.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/_rmlock.h> | #include <sys/_rmlock.h> | ||||
#include <sys/vmmeter.h> | |||||
#include <sys/resource.h> | #include <sys/resource.h> | ||||
#include <machine/pcpu.h> | #include <machine/pcpu.h> | ||||
#define DPCPU_SETNAME "set_pcpu" | #define DPCPU_SETNAME "set_pcpu" | ||||
#define DPCPU_SYMPREFIX "pcpu_entry_" | #define DPCPU_SYMPREFIX "pcpu_entry_" | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | struct pcpu { | ||||
struct thread *pc_fpcurthread; /* Fp state owner */ | struct thread *pc_fpcurthread; /* Fp state owner */ | ||||
struct thread *pc_deadthread; /* Zombie thread or NULL */ | struct thread *pc_deadthread; /* Zombie thread or NULL */ | ||||
struct pcb *pc_curpcb; /* Current pcb */ | struct pcb *pc_curpcb; /* Current pcb */ | ||||
uint64_t pc_switchtime; /* cpu_ticks() at last csw */ | uint64_t pc_switchtime; /* cpu_ticks() at last csw */ | ||||
int pc_switchticks; /* `ticks' at last csw */ | int pc_switchticks; /* `ticks' at last csw */ | ||||
u_int pc_cpuid; /* This cpu number */ | u_int pc_cpuid; /* This cpu number */ | ||||
STAILQ_ENTRY(pcpu) pc_allcpu; | STAILQ_ENTRY(pcpu) pc_allcpu; | ||||
struct lock_list_entry *pc_spinlocks; | struct lock_list_entry *pc_spinlocks; | ||||
struct vmmeter pc_cnt; /* VM stats counters */ | |||||
long pc_cp_time[CPUSTATES]; /* statclock ticks */ | long pc_cp_time[CPUSTATES]; /* statclock ticks */ | ||||
struct device *pc_device; | struct device *pc_device; | ||||
void *pc_netisr; /* netisr SWI cookie */ | void *pc_netisr; /* netisr SWI cookie */ | ||||
int pc_unused1; /* unused field */ | int pc_unused1; /* unused field */ | ||||
int pc_domain; /* Memory domain. */ | int pc_domain; /* Memory domain. */ | ||||
struct rm_queue pc_rm_queue; /* rmlock list of trackers */ | struct rm_queue pc_rm_queue; /* rmlock list of trackers */ | ||||
uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ | uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ | ||||
uint64_t pc_early_dummy_counter; /* Startup time counter(9) */ | |||||
/* | /* | ||||
* Keep MD fields last, so that CPU-specific variations on a | * Keep MD fields last, so that CPU-specific variations on a | ||||
* single architecture don't result in offset variations of | * single architecture don't result in offset variations of | ||||
* the machine-independent fields of the pcpu. Even though | * the machine-independent fields of the pcpu. Even though | ||||
* the pcpu structure is private to the kernel, some ports | * the pcpu structure is private to the kernel, some ports | ||||
* (e.g., lsof, part of gtop) define _KERNEL and include this | * (e.g., lsof, part of gtop) define _KERNEL and include this | ||||
* header. While strictly speaking this is wrong, there's no | * header. While strictly speaking this is wrong, there's no | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |