Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/proc.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | |||||
* k - only accessed by curthread | * k - only accessed by curthread | ||||
* k*- only accessed by curthread and from an interrupt | * k*- only accessed by curthread and from an interrupt | ||||
* l - the attaching proc or attaching proc parent | * l - the attaching proc or attaching proc parent | ||||
* m - Giant | * m - Giant | ||||
* n - not locked, lazy | * n - not locked, lazy | ||||
* o - ktrace lock | * o - ktrace lock | ||||
* q - td_contested lock | * q - td_contested lock | ||||
* r - p_peers lock | * r - p_peers lock | ||||
* s - by curthread, or by others when curthread is on sleepqueue | |||||
kib: This is too cryptic. My understanding is that owner of the field if curthread when running. | |||||
Done Inline ActionsYes, this deserves more explanation. vangyzen: Yes, this deserves more explanation. | |||||
* t - thread lock | * t - thread lock | ||||
* u - process stat lock | * u - process stat lock | ||||
* w - process timer lock | * w - process timer lock | ||||
* x - created at fork, only changes during single threading in exec | * x - created at fork, only changes during single threading in exec | ||||
* y - created at first aio, doesn't change until exit or exec at which | * y - created at first aio, doesn't change until exit or exec at which | ||||
* point we are single-threaded and only curthread changes it | * point we are single-threaded and only curthread changes it | ||||
* z - zombie threads lock | * z - zombie threads lock | ||||
* | * | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | #define td_startzero td_flags | ||||
struct osd td_osd; /* (k) Object specific data. */ | struct osd td_osd; /* (k) Object specific data. */ | ||||
struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ | struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ | ||||
pid_t td_dbg_forked; /* (c) Child pid for debugger. */ | pid_t td_dbg_forked; /* (c) Child pid for debugger. */ | ||||
u_int td_vp_reserv; /* (k) Count of reserved vnodes. */ | u_int td_vp_reserv; /* (k) Count of reserved vnodes. */ | ||||
int td_no_sleeping; /* (k) Sleeping disabled count. */ | int td_no_sleeping; /* (k) Sleeping disabled count. */ | ||||
int td_dom_rr_idx; /* (k) RR Numa domain selection. */ | int td_dom_rr_idx; /* (k) RR Numa domain selection. */ | ||||
void *td_su; /* (k) FFS SU private */ | void *td_su; /* (k) FFS SU private */ | ||||
sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ | sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ | ||||
int td_rtcgen; /* (s) rtc_generation of sleep */ | |||||
#define td_endzero td_sigmask | #define td_endzero td_sigmask | ||||
/* Copied during fork1() or create_thread(). */ | /* Copied during fork1() or create_thread(). */ | ||||
#define td_startcopy td_endzero | #define td_startcopy td_endzero | ||||
sigset_t td_sigmask; /* (c) Current signal mask. */ | sigset_t td_sigmask; /* (c) Current signal mask. */ | ||||
u_char td_rqindex; /* (t) Run queue index. */ | u_char td_rqindex; /* (t) Run queue index. */ | ||||
u_char td_base_pri; /* (t) Thread base kernel priority. */ | u_char td_base_pri; /* (t) Thread base kernel priority. */ | ||||
u_char td_priority; /* (t) Thread active priority. */ | u_char td_priority; /* (t) Thread active priority. */ | ||||
▲ Show 20 Lines • Show All 826 Lines • Show Last 20 Lines |
This is too cryptic. My understanding is that owner of the field if curthread when running. When curthread is sleeping, the field is protected by the thread lock. I am not sure how to explain this shortly in the annotations, might be a longer comment in more appropriate place would be less confusing.