Adding Ed Schouten and Jorg Wunsch as I see there are author of msleep/mtx related APIs.
> -----Original Message----- > From: Desai, Kashyap > Sent: Wednesday, February 22, 2012 7:37 PM > To: freebsd-s...@freebsd.org; freebsd-stable > Cc: 'Kenneth D. Merry'; McConnell, Stephen; Justin T. Gibbs > Subject: mpslsi0 : Trying sleep, but thread marked as sleeping > prohibited > > Hi, > > I am doing some code changes in mps dirver. While working on those > changes, I come to know about something which is new to me. > Some expert help is required to clarify my doubt. > > 1. When any irq is register with FreeBSD OS, it sets " TDP_NOSLEEPING" > pflag. It means though irq in freebsd is treated as thread, > We cannot sleep in IRQ because of " "TDP_NOSLEEPING " set. > 2. In mps driver we have below code snippet in ISR routine. > > > mps_dprint(sc, MPS_TRACE, "%s\n", __func__); > mps_lock(sc); > mps_intr_locked(data); > mps_unlock(sc); > > I wonder why there is no issue with above code ? Theoretical we cannot > sleep in ISR. (as explained in #1) > Any thoughts ? > > > 3. I recently added few place msleep() instead of DELAY in ISR context > and I see > " Trying sleep, but thread marked as sleeping prohibited". > > > ` Kashyap _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"