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 | ||||
* t - thread lock | * t - thread lock | ||||
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. | |||||
* 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 | ||||
* | * | ||||
* If the locking key specifies two identifiers (for example, p_pptr) then | * If the locking key specifies two identifiers (for example, p_pptr) then | ||||
▲ Show 20 Lines • Show All 118 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; /* (?) 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 91 Lines • ▼ Show 20 Lines | |||||
#define TDF_TIMEOUT 0x00000010 /* Timing out during sleep. */ | #define TDF_TIMEOUT 0x00000010 /* Timing out during sleep. */ | ||||
#define TDF_IDLETD 0x00000020 /* This is a per-CPU idle thread. */ | #define TDF_IDLETD 0x00000020 /* This is a per-CPU idle thread. */ | ||||
#define TDF_CANSWAP 0x00000040 /* Thread can be swapped. */ | #define TDF_CANSWAP 0x00000040 /* Thread can be swapped. */ | ||||
#define TDF_SLEEPABORT 0x00000080 /* sleepq_abort was called. */ | #define TDF_SLEEPABORT 0x00000080 /* sleepq_abort was called. */ | ||||
#define TDF_KTH_SUSP 0x00000100 /* kthread is suspended */ | #define TDF_KTH_SUSP 0x00000100 /* kthread is suspended */ | ||||
#define TDF_ALLPROCSUSP 0x00000200 /* suspended by SINGLE_ALLPROC */ | #define TDF_ALLPROCSUSP 0x00000200 /* suspended by SINGLE_ALLPROC */ | ||||
#define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ | #define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ | ||||
#define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ | #define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ | ||||
#define TDF_UNUSED12 0x00001000 /* --available-- */ | #define TDF_SLEEPRTC 0x00001000 /* Sleep is based on the real-time clock */ | ||||
#define TDF_SBDRY 0x00002000 /* Stop only on usermode boundary. */ | #define TDF_SBDRY 0x00002000 /* Stop only on usermode boundary. */ | ||||
#define TDF_UPIBLOCKED 0x00004000 /* Thread blocked on user PI mutex. */ | #define TDF_UPIBLOCKED 0x00004000 /* Thread blocked on user PI mutex. */ | ||||
#define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ | #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ | ||||
#define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ | #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ | ||||
#define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ | #define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ | ||||
#define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ | #define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ | ||||
#define TDF_SERESTART 0x00080000 /* ERESTART on stop attempts. */ | #define TDF_SERESTART 0x00080000 /* ERESTART on stop attempts. */ | ||||
#define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ | #define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ | ||||
▲ Show 20 Lines • Show All 718 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.