[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Sun, 11 Apr 2004 20:01:26 +0000 (UTC) 
Subject:Re: sys_async_io and pipes under linux 
From:Roger . Evans 
Volume-ID: 

Joe,

I think the answer is that pipe devices are not considered as tty-type 
devices, and so  async-io  doesn't work with them (at the unix level - 
poplog has no control over this). To achieve the effect of a pipe, you 
could use sys_socket_pair, which probably would respond correctly to the 
async-io stuff..

Roger

Joe Wood wrote:

>Hi,
>
>The procedure sys_async_io, (see ref sysio) takes a devices and establishes
>an asynchronious reader/writer routine. Ultimately this is a call to fcntl
>(2) in the kernel.
>
>Now the following 2 fragments return successfully:
>
>    sysopen ( '/dev/tty', 0, false ) -> pin ;
>    read -> sys_async_io ( pin, 0 ) ;
>
>and
>
>    sys_socket ( `U`, `D`, false ) -> pin ;
>    read -> sys_async_io ( pin, 0 ) ;
>
>
>But
>    syspipe (false) -> pin -> pout ;             ;;; order may be wrong
>here, but _that_ is not the problem
>    read -> sys_async_io ( pin, 0 ) ;
>
>fails inside the kernel, ENOTTY. I know this is coming from the kernel
>because I ran strace to see the system calls.
>
>Does anybody know the reason.
>
>Thanks
>Joe
>
>
>
>  
>