Subject: Re: struct emul modification
To: None <p99dreyf@criens.u-psud.fr>
From: Jaromír <jdolecek@netbsd.org>
List: tech-kern
Date: 05/19/2001 18:07:18
Emmanuel Dreyfus wrote:
> powerpc. Then, we will have to also do it for FreeBSD and Solaris
> emulations, because the problem is not Linux specific.

See below.
 
> We would end up with a lot of code duplication in machine dependant
> files, and I am not sure this would be right.

Such code duplication is easily avoidable via shared routine
on generic place, which gets called on appropriate places
in MD or bus-dependant code.
 
> > I'd hate to add some stuff which
> > would become obsolete the moment newpipe would go in.
> 
> As Christos said, we do not want to alter the current NetBSD native
> behavior when adding newpipes, so we want to modify newpipes to get
> async I/O.

BTW, I looked at newpipe again and it DOES send the SIGIO for pipe
(I haven't tested actual behaviour, just stared at the code).
This also means FreeBSD sends the SIGIO for pipe too. I'm not sure
about Solaris though; I assume that if Solaris doesn't send
the signal, it's merely an overlooking rather than a design decision.

I THINK this _should_ be handled in Linux-specific code. The most
simple solution would be to hook a check for descriptor being
a pipe in linux_sys_ioctl() for FIOASYNC. Easy, avoids pollution
of generic code and eases integration of alternate pipe implementations.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!