summaryrefslogtreecommitdiff
path: root/libps/procstat.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-08 21:20:04 +0000
committerMiles Bader <miles@gnu.org>1996-10-08 21:20:04 +0000
commitffe687db775393a05cdeae8550f9b6595d424678 (patch)
tree6c12cfac60885a1b6006e8889e3b414face870ad /libps/procstat.c
parentaa643c31acb1b09608bb8ad489dbd48e6975d292 (diff)
(proc_stat_set_flags):
Get rid of INAPP macro. Fix preconditions of PSTAT_SUSPEND_COUNT.
Diffstat (limited to 'libps/procstat.c')
-rw-r--r--libps/procstat.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libps/procstat.c b/libps/procstat.c
index 5541a747..461d8113 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -772,9 +772,6 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
need = flags & ~have & ~ps->failed;
- /* Returns true if some flag in FLAGS is `inapplicable'. */
-#define INAPP(flags) (flags & (need & ~have) & ps->inapp)
-
/* Returns true if (1) FLAGS is in NEED, and (2) the appropriate
preconditions PRECOND are available; if only (1) is true, FLAG is added
to the INAPP set if appropiate (to distinguish it from an error), and
@@ -790,7 +787,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
else \
{ \
val = 0; \
- if (INAPP (_precond)) \
+ if (_precond & ps->inapp) \
ps->inapp |= __flag; \
} \
val; \
@@ -830,10 +827,8 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags)
later. */
have = set_procinfo_flags (ps, need & ~have & test_msgport_flags, have);
- if (NEED (PSTAT_SUSPEND_COUNT,
- ((have & PSTAT_PID)
- ? (have & PSTAT_TASK_BASIC)
- : (have & PSTAT_THREAD_BASIC))))
+ if (NEED (PSTAT_SUSPEND_COUNT,
+ ((have & PSTAT_PID) ? PSTAT_TASK_BASIC : PSTAT_THREAD_BASIC)))
{
if (have & PSTAT_PID)
ps->suspend_count = ps->task_basic_info->suspend_count;