Re: POLLOUT and sigio..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Dec 2001 19:53:44 +0300
Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:

> On Mon, 17 Dec 2001 10:20:28 -0500 (EST)
> Aaron Sethman <androsyn@ratbox.org> wrote:
> 
> > 
> > I am attempting to make a pre-existing server use SIGIO with posix rt
> > signals and I am having some difficulties with it.  Mainly with
> reception
> > of POLLOUT.  When exactly should this get sent?  Should it only get
sent
> > when attempting to write() and getting EAGAIN, then the socket being
> ready
> > or?
> 
> I suppose that you must send SIGIO when data actually arives from
socket.
> In accordance of LDD2 write() method should look something like this:
> ssize_t _write(...)
> {
> 	/* Some data defenitions */
> 
> 	if (dev->async_queue)
> 		kill_fasync(&dev->async_queue, SIGIO, POLL_IN);

Oops... POLOUT must be in read method()
And all others must be the same.
Sorry, broken hands... 

> 	if (down_interruptible(&dev->sem))
> 		return -ERESTARTSYS;
> 
> 	/* Work with data transaction itself */
> }
> 

---
WBR. //s0mbre
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux