diff options
author | avg <avg@FreeBSD.org> | 2017-04-14 14:44:00 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2017-04-14 14:44:00 +0000 |
commit | e445463286be26270b322e849720035b1bb635c8 (patch) | |
tree | 5812e6eb44065baf497c8a31fe6fcd3bfee61f8b /sys/sys | |
parent | 28e1b9d886f91810da1fb3ee3d6649b5e6702d27 (diff) | |
download | FreeBSD-src-e445463286be26270b322e849720035b1bb635c8.zip FreeBSD-src-e445463286be26270b322e849720035b1bb635c8.tar.gz |
MFC r315851: move thread switch tracing from mi_switch to sched_switch
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/proc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 178b980..a5dd3b2 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -487,6 +487,12 @@ do { \ #define TD_ON_UPILOCK(td) ((td)->td_flags & TDF_UPIBLOCKED) #define TD_IS_IDLETHREAD(td) ((td)->td_flags & TDF_IDLETD) +#define KTDSTATE(td) \ + (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ + ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ + ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ + ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ + ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") #define TD_SET_INHIB(td, inhib) do { \ (td)->td_state = TDS_INHIBITED; \ |