From 9bfd4d3669d582ccdc2cab17baf3f625dc7580e7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 13 May 1996 01:39:33 +0000 Subject: (PSTAT_THREAD_WAITS): New macro. --- libps/ps.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libps') diff --git a/libps/ps.h b/libps/ps.h index 6eba3ac7..9f4c9b18 100644 --- a/libps/ps.h +++ b/libps/ps.h @@ -300,10 +300,18 @@ struct proc_stat #define PSTAT_TASK_BASIC 0x00040 /* The task's struct task_basic_info. */ #define PSTAT_TASK_EVENTS 0x01000 /* A task_events_info_t for the proc. */ #define PSTAT_NUM_THREADS 0x00080 /* The number of threads in the task. */ +/* Note that for a process-procstat, the thread information fields generally + are a summary of the process's threads, and imply that the corresponding + information has been fetched for all its threads. The exception is + thread-wait information (PSTAT_THREAD_WAIT), which is expensive to fetch + for processes with lots of threads, and not terrible useful. In this + case, the thread waits vector containing per-thread information is only + guaranteed to be valid if PSTAT_THREAD_WAITS is true as well. */ #define PSTAT_THREAD_BASIC 0x00100 /* A struct thread_basic_info. */ #define PSTAT_THREAD_SCHED 0x00200 /* A struct thread_sched_info. */ -#define PSTAT_THREAD_WAIT 0x00400 /* The rpc the thread is waiting on. */ -#define PSTAT_ARGS 0x00800 /* The process's args */ +#define PSTAT_THREAD_WAIT 0x00400 /* The rpc the thread is waiting on. */ +#define PSTAT_THREAD_WAITS 0x00800 /* Thread waits for this PS's threads */ +#define PSTAT_ARGS 0x01000 /* The process's args */ #define PSTAT_STATE 0x02000 /* A bitmask describing the process's state (see below) */ #define PSTAT_SUSPEND_COUNT 0x04000 /* Task/thread suspend count */ -- cgit v1.2.3