[Mono-dev] [HaikuPorts-devs] [RFC v2 6/8] serial: Stub implementation for Haiku

Andreas Färber andreas.faerber at web.de
Thu Apr 1 08:31:39 EDT 2010


Hello François,

Am 01.04.2010 um 10:35 schrieb François Revol:

> Le Thu,  1 Apr 2010 02:27:57 +0200, Andreas Färber a écrit :
>> Haiku has no full serial support, especially no TIOCOUTQ or TIOCM_*.
>> Provide a no-op implementation similar to null-gc.
>>
>
> Again, TIOCOUTQ is not found on opengroup.org, neither are TIOCM_*
> which seem to be from SysV.

This one's still at v2, so I haven't reworked it yet.

> As I said, there is no reason to skip serial support because of  
> that...

The patch fixes a blocking compile issue, so as long as Haiku doesn't  
provide the defines/symbols used or you tell me which available ones I  
might use instead, I need such a patch to compile at all.

Even if Haiku gets new ioctls to provide serial support, a null  
implementation may still be useful for other platforms. There's  
console-null and null-gc, for instance.

> TIOCOUTQ can be easily added to Haiku, or the BSD variant FIONWRITE.

I have virtually zero knowledge of ioctls and no opinion on which  
ioctls or non-POSIX things you might want to add to Haiku. I was under  
the impression that Mono works under BSDs though.

Since Miguel suggested a serial-PLAT split, you might even add a new  
BYOUROWNIOCTL that I could use in a serial-haiku implementation. What  
did BeOS do? R5 did have a SerialConnect app.

> As for TIOCMGET and friends it should be possible to #ifdef it out to
> return -1 with errno = ENOSYS. The calls already have provisions to
> return errors.

Wasn't that pretty much what my initial version did? That was rejected  
on the Mono side.

> Unless used by a low level app like a serial flasher app
> I don't see why one would need to use modem lines directly, so for  
> most
> apps it shouldn't be needed...

My test machine has one serial port only, and that's occupied for  
kernel debug output, I fear. So I'd need to use QEMU, and it's no fun  
compiling Mono under emulation (tried it for sparc32). I don't have  
any C# serial apps to test ATM anyway.

Andreas



More information about the Mono-devel-list mailing list