Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Jul 2008 10:12:29 -0500 (CDT)
From:      Sergey Babkin <babkin@verizon.net>
To:        Sergey Babkin <babkin@verizon.net>, Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org
Subject:   Re: Re: Proposal: a revoke() system call
Message-ID:  <1878557.67061215443549669.JavaMail.root@vms074.mailsrvcs.net>

next in thread | raw e-mail | index | archive | help
>>Rationale:
>>
>>In the multithreaded programs often multiple threads work with the
>>same file descriptor. A particularly typical situation is a reader
>>thread and a writer thread. The reader thread calls read(), gets
>>blocked until it gets more data, then processes the data and
>>continues the loop. Another example of a "reader thread" would be 
>>the main thread of a daemon that accepts the incoming connections
>>and starts new per-connection threads. 
>
>Have you tried to implement the functionality you're asking for ?
>
>You'll have to hunt down into all sorts of protocols, drivers
>and other code to find the threads sleeping on your fd so you can
>wake them.

My thinking has been that if close() wakes them up, then things would be
inherited from there. The thing I didn't know is that apparently in many cases close()
doesn't wake them up.

-SB




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