Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2002 13:14:05 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        freebsd-hackers@freebsd.org
Cc:        Julian Elischer <julian@elischer.org>, Alan Cox <alc@cs.rice.edu>, Tor.Egge@cvsup.no.freebsd.org
Subject:   Bug in wakeup() (stable and current) ? 
Message-ID:  <200206232014.g5NKE5x3058562@apollo.backplane.com>

next in thread | raw e-mail | index | archive | help
    This doesn't look right at all.  It looks like wakeup is not restarting
    properly:

        s = splhigh();
        qp = &slpque[LOOKUP(ident)];
restart:
        TAILQ_FOREACH(p, qp, p_procq) {
                if (p->p_wchan == ident) {
                        TAILQ_REMOVE(qp, p, p_procq);
                        p->p_wchan = 0;
                        if (p->p_stat == SSLEEP) {
				...
				goto restart;
			}
			/* XXXXXX goto restart should occur HERE XXXXXX */
		}
	}

    The goto restart condition should occur one level up, as I show in
    the comment.

    Could someone take a look at this and tell me if I am blowing smoke?

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

Index: kern_synch.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_synch.c,v
retrieving revision 1.87.2.4
diff -u -r1.87.2.4 kern_synch.c
--- kern_synch.c	14 Nov 2001 17:22:49 -0000	1.87.2.4
+++ kern_synch.c	23 Jun 2002 20:10:37 -0000
@@ -745,8 +745,8 @@
 					wakeup((caddr_t)&proc0);
 				}
 				/* END INLINE EXPANSION */
-				goto restart;
 			}
+			goto restart;
 		}
 	}
 	splx(s);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206232014.g5NKE5x3058562>