Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 20:29:35 -0700
From:      Jeffrey Hsu <hsu@FreeBSD.org>
To:        harti@FreeBSD.ORG
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: LOR in if_detach
Message-ID:  <0HD7006Z9O9T0N@mta5.snfc21.pbi.net>
In-Reply-To: "Your message of Fri, 11 Apr 2003 18:11:30 %2B0200." <20030411175926.U1137@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help
  > Do you think of something like the following?

  > static int
  > foo_detach(device_t dev)
  > {
  > ...
  >
  >	LOCK(softc);

The other big race here is between detach and the next attach.
This is better solved with a lock at the interface layer rather
than on the softc.

							Jeffrey



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