Subject: Re: kern/29600: cbb(4) hangs on boot
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: FUKAUMI Naoki <fun@naobsd.org>
List: netbsd-bugs
Date: 03/12/2005 08:40:02
The following reply was made to PR kern/29600; it has been noted by GNATS.

From: FUKAUMI Naoki <fun@naobsd.org>
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>, gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/29600: cbb(4) hangs on boot
Date: Sat, 12 Mar 2005 17:39:32 +0900

 At Sat, 12 Mar 2005 17:24:17 +0900,
 FUKAUMI Naoki wrote:
 > > > We don't have any reason to wait value is changed in while() loop.
 > > > 
 > > > tsleep() will be awakened if power cycle event occured. There is no
 > > > reason to check sc_pwrcycle value.
 > > 
 > > i think
 > > 	while (condition) {
 > > 		sleep();
 > > 	}
 > > is a common convention to prevent spurious wakeups.
 > 
 > hmm....
 > 
 > Is it possible to awake tsleep($sc->sc_pwrcycle) by another place?
 > (i.e. except wakeup(&sc->sc_pwrcycle))
 
 How to handle "condition is never changed" case?
 How to handle "sleep() is never awakened" case?
 
 I can't give answers.
 
 # Maybe, reverting rev. 1.111 and 1.112 is one of the answer. ;)
 
 --
 FUKAUMI Naoki