Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2001 11:51:45 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Richard Todd <rmtodd@ichotolot.servalan.com>
Cc:        current@FreeBSD.ORG
Subject:   selwakeup()
Message-ID:  <200104051551.LAA00666@khavrinen.lcs.mit.edu>
In-Reply-To: <m14l3Qd-004MUNC@servalan.servalan.com>
References:  <m14l3Qd-004MUNC@servalan.servalan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 05 Apr 2001 01:39:35 -0500, Richard Todd <rmtodd@ichotolot.servalan.com> said:

> If I'm reading this backtrace right, the thread handling the sound
> hardware called selwakeup() (frame #19).  This called pfind() (frame
> #18), which tries to lock allproc.

selwakeup() shouldn't need to call pfind().  Because the process table
is in type-stable memory, it should be sufficient to keep a reference
to the caller's proc structure and check to see whether its pid is the
same one as in the selinfo.  The locking that selwakeup() already
needs to do should be sufficient to avoid a race.

(In 4.4BSD, process structures were not type-stable so this technique
could not have been used.)

-GAWollman


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




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