diff options
author | hsu <hsu@FreeBSD.org> | 1996-03-11 05:48:57 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 1996-03-11 05:48:57 +0000 |
commit | 6cb9410e277749fe52181e76193f7ab402a62c61 (patch) | |
tree | 3ae9fbde5137f538811fb91dbe009f9d6b2120dc /sys/kern/kern_synch.c | |
parent | 6ee23b6d3109e767076e589ee510d2c70f205392 (diff) | |
download | FreeBSD-src-6cb9410e277749fe52181e76193f7ab402a62c61.zip FreeBSD-src-6cb9410e277749fe52181e76193f7ab402a62c61.tar.gz |
Merge in Lite2: proc LIST changes
64-bit fix for alpha
add debugging code for locking
Reviewed by: david & bde
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 62d3f3a..b904f22 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -35,8 +35,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)kern_synch.c 8.6 (Berkeley) 1/21/94 - * $Id: kern_synch.c,v 1.17 1996/01/03 21:42:12 wollman Exp $ + * @(#)kern_synch.c 8.9 (Berkeley) 5/19/95 + * $Id: kern_synch.c,v 1.19 1996/03/03 23:04:10 hsu Exp $ */ #include "opt_ktrace.h" @@ -180,7 +180,7 @@ schedcpu(arg) register unsigned int newcpu; wakeup((caddr_t)&lbolt); - for (p = (struct proc *)allproc; p != NULL; p = p->p_next) { + for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { /* * Increment time in/out of memory and sleep time * (if sleeping). We ignore overflow; with 16-bit int's @@ -260,7 +260,7 @@ updatepri(p) * of 2. Shift right by 8, i.e. drop the bottom 256 worth. */ #define TABLESIZE 128 -#define LOOKUP(x) (((int)(x) >> 8) & (TABLESIZE - 1)) +#define LOOKUP(x) (((long)(x) >> 8) & (TABLESIZE - 1)) struct slpque { struct proc *sq_head; struct proc **sq_tailp; @@ -560,6 +560,10 @@ mi_switch() register long s, u; struct timeval tv; +#ifdef DEBUG + if (p->p_simple_locks) + panic("sleep: holding simple lock"); +#endif /* * Compute the amount of time during which the current * process was running, and add that to its total so far. |