Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/proc.h
Show First 20 Lines • Show All 486 Lines • ▼ Show 20 Lines | |||||
#define TDP_IGNSUSP 0x00800000 /* Permission to ignore the MNTK_SUSPEND* */ | #define TDP_IGNSUSP 0x00800000 /* Permission to ignore the MNTK_SUSPEND* */ | ||||
#define TDP_AUDITREC 0x01000000 /* Audit record pending on thread */ | #define TDP_AUDITREC 0x01000000 /* Audit record pending on thread */ | ||||
#define TDP_RFPPWAIT 0x02000000 /* Handle RFPPWAIT on syscall exit */ | #define TDP_RFPPWAIT 0x02000000 /* Handle RFPPWAIT on syscall exit */ | ||||
#define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ | #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ | ||||
#define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ | #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ | ||||
#define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ | #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ | ||||
#define TDP_FORKING 0x20000000 /* Thread is being created through fork() */ | #define TDP_FORKING 0x20000000 /* Thread is being created through fork() */ | ||||
#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ | #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ | ||||
#define TDP_SUGID 0x80000000 /* Thread is tainted by setcred(2) */ | |||||
/* | /* | ||||
* Reasons that the current thread can not be run yet. | * Reasons that the current thread can not be run yet. | ||||
* More than one may apply. | * More than one may apply. | ||||
*/ | */ | ||||
#define TDI_SUSPENDED 0x0001 /* On suspension queue. */ | #define TDI_SUSPENDED 0x0001 /* On suspension queue. */ | ||||
#define TDI_SLEEPING 0x0002 /* Actually asleep! (tricky). */ | #define TDI_SLEEPING 0x0002 /* Actually asleep! (tricky). */ | ||||
#define TDI_SWAPPED 0x0004 /* Stack not in mem. Bad juju if run. */ | #define TDI_SWAPPED 0x0004 /* Stack not in mem. Bad juju if run. */ | ||||
#define TDI_LOCK 0x0008 /* Stopped on a lock. */ | #define TDI_LOCK 0x0008 /* Stopped on a lock. */ | ||||
#define TDI_IWAIT 0x0010 /* Awaiting interrupt. */ | #define TDI_IWAIT 0x0010 /* Awaiting interrupt. */ | ||||
#define TD_IS_SLEEPING(td) ((td)->td_inhibitors & TDI_SLEEPING) | #define TD_IS_SLEEPING(td) ((td)->td_inhibitors & TDI_SLEEPING) | ||||
#define TD_ON_SLEEPQ(td) ((td)->td_wchan != NULL) | #define TD_ON_SLEEPQ(td) ((td)->td_wchan != NULL) | ||||
#define TD_IS_SUSPENDED(td) ((td)->td_inhibitors & TDI_SUSPENDED) | #define TD_IS_SUSPENDED(td) ((td)->td_inhibitors & TDI_SUSPENDED) | ||||
#define TD_IS_SWAPPED(td) ((td)->td_inhibitors & TDI_SWAPPED) | #define TD_IS_SWAPPED(td) ((td)->td_inhibitors & TDI_SWAPPED) | ||||
#define TD_ON_LOCK(td) ((td)->td_inhibitors & TDI_LOCK) | #define TD_ON_LOCK(td) ((td)->td_inhibitors & TDI_LOCK) | ||||
#define TD_AWAITING_INTR(td) ((td)->td_inhibitors & TDI_IWAIT) | #define TD_AWAITING_INTR(td) ((td)->td_inhibitors & TDI_IWAIT) | ||||
#define TD_IS_RUNNING(td) ((td)->td_state == TDS_RUNNING) | #define TD_IS_RUNNING(td) ((td)->td_state == TDS_RUNNING) | ||||
#define TD_ON_RUNQ(td) ((td)->td_state == TDS_RUNQ) | #define TD_ON_RUNQ(td) ((td)->td_state == TDS_RUNQ) | ||||
#define TD_CAN_RUN(td) ((td)->td_state == TDS_CAN_RUN) | #define TD_CAN_RUN(td) ((td)->td_state == TDS_CAN_RUN) | ||||
#define TD_IS_INHIBITED(td) ((td)->td_state == TDS_INHIBITED) | #define TD_IS_INHIBITED(td) ((td)->td_state == TDS_INHIBITED) | ||||
#define TD_ON_UPILOCK(td) ((td)->td_flags & TDF_UPIBLOCKED) | #define TD_ON_UPILOCK(td) ((td)->td_flags & TDF_UPIBLOCKED) | ||||
#define TD_IS_IDLETHREAD(td) ((td)->td_flags & TDF_IDLETD) | #define TD_IS_IDLETHREAD(td) ((td)->td_flags & TDF_IDLETD) | ||||
#define TD_IS_SUGID(td) ((td)->td_pflags & TDP_SUGID) | |||||
#define KTDSTATE(td) \ | #define KTDSTATE(td) \ | ||||
(((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ | (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ | ||||
((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ | ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ | ||||
((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ | ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ | ||||
((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ | ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ | ||||
((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") | ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") | ||||
▲ Show 20 Lines • Show All 658 Lines • Show Last 20 Lines |