[Mono-list] Intrinsicly Non-Portable?
Dick Porter
dick@ximian.com
Fri, 23 Nov 2001 23:52:49 +0000
On Fri, Nov 23, 2001 at 05:09:28PM -0500, Christian Ratliff wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Wonderful!
>
> Is there any documentation on the structure of the io-layer? If I
> wanted to chip in an implementation of WSAEVENT, where would I start
> my reading?
Each type of handle is implemented in its own file, and defines its own
totally private structure that inherits from a common struct. semaphores.c
looks like a reasonably straightforward one to crib from.
The hard part is waiting for multiple handles to become signalled. wait.c
fires off subthreads for each type of handle to wait for, and gathers in
the responses for WaitForMultipleObjects.
Actually, socket IO might be handled easiest by just extending io.c which
currently handles console and file IO. I havent written the wait_multiple
support for console IO yet (or file IO, but that's only used for overlapped
IO which also hasnt been implemented yet) but thats a fairly simple use
of poll(2).
- Dick