cvs commit: src/sys/kern kern_proc.c

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jun 9 18:17:23 GMT 2004


In message <20040609173747.GT12007 at 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 at 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.


More information about the cvs-src mailing list