proc_compare.c (8b56c58be4643a21fa74ddf390f8f358d10ae284) proc_compare.c (e8e649cc5dd773fdde330d58c17c9f03e2f28286)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 61 unchanged lines hidden (view full) ---

70
71#define ISRUN(p) (((p)->ki_stat == SRUN) || ((p)->ki_stat == SIDL))
72#define TESTAB(a, b) ((a)<<1 | (b))
73#define ONLYA 2
74#define ONLYB 1
75#define BOTH 3
76
77int
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 61 unchanged lines hidden (view full) ---

70
71#define ISRUN(p) (((p)->ki_stat == SRUN) || ((p)->ki_stat == SIDL))
72#define TESTAB(a, b) ((a)<<1 | (b))
73#define ONLYA 2
74#define ONLYB 1
75#define BOTH 3
76
77int
78proc_compare(p1, p2)
79 struct kinfo_proc *p1, *p2;
78proc_compare(struct kinfo_proc *p1, struct kinfo_proc *p2)
80{
81
82 if (p1 == NULL)
83 return (1);
84 /*
85 * see if at least one of them is runnable
86 */
87 switch (TESTAB(ISRUN(p1), ISRUN(p2))) {

--- 41 unchanged lines hidden ---
79{
80
81 if (p1 == NULL)
82 return (1);
83 /*
84 * see if at least one of them is runnable
85 */
86 switch (TESTAB(ISRUN(p1), ISRUN(p2))) {

--- 41 unchanged lines hidden ---