Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jun 2004 20:16:51 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Subject:   Re: cvs commit: src/sys/kern kern_proc.c 
Message-ID:  <57259.1086805011@critter.freebsd.dk>
In-Reply-To: Your message of "Wed, 09 Jun 2004 19:37:47 %2B0200." <20040609173747.GT12007@darkness.comp.waw.pl> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20040609173747.GT12007@darkness.comp.waw.pl>, Pawel Jakub Dawidek w
rites:

>No, it is still wrong. The only good way is green's way.
>You cannot destroy object even if you held its lock, because another
>thread can sleep on this lock and it will be destroyed under it.
>
>So first of all one have to lock whole list of element before will
>take one of then and then remove it from the list before list-lock
>is released.

Again: see kern/tty.c for fresh example.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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