FreeBSD/sys/dev/utopia/utopia.c
/*
 * Detach. We set a flag here, wakeup the daemon and let him do it.
 * Here we need the lock for synchronisation with the daemon.
 */
Detach. We set a flag here, wakeup the daemon and let him do it.
Here we need the lock for synchronisation with the daemon.
Detach . We set a flag here wakeup the daemon and let him do it . Here we need the lock for synchronisation with the daemon .
void
utopia_detach(struct utopia *utp)
{
	UTP_LOCK_ASSERT(utp);
	if (utp->state & UTP_ST_ATTACHED) {
		utp->state |= UTP_ST_DETACH;
		while (utp->state & UTP_ST_DETACH) {
			wakeup(&utopia_list);
			msleep(utp, utp->lock, PZERO, "utopia_detach", hz);
		}
	}
}
void utopia_detach ( struct utopia * utp ) { UTP_LOCK_ASSERT ( utp ) ; if ( utp -> state & UTP_ST_ATTACHED ) { utp -> state |= UTP_ST_DETACH ; while ( utp -> state & UTP_ST_DETACH ) { wakeup ( & utopia_list ) ; msleep ( utp , utp -> lock , PZERO , " " , hz ) ; } } }
Detach.
Detach .