Hello Jakub,

Look for example at file[1]. There are 4 ifdefs switching WIN and POSIX
implementation there. The windows section of the biggest one starts at line
1833. Among the CreateEvent function there are functions like CreateThread,
CreateFile, ReadFile, WriteFile, ReadConsoleInput, CreateNamedPipe and
CloseHandle. The CloseHandle function takes a value of type HANDLE and
closes an Event, File, Semaphore ... (for full list see [2]) depending on
what it gets. If those structures are not all supported by the VFS I will
have to distinguish between the different types judging by the received
HANDLE. The only way I can imagine implementing that is a hack similar to
the one described in the previous message.

Also there are other files in QEMU and glib similar to this one.

Jan

[1] https://github.com/qemu/qemu/blob/master/qemu-char.c
[2]
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx

2015-03-17 13:24 GMT+01:00 Jakub Jermar <[email protected]>:

> On 16.3.2015 21:02, Jan Mareš wrote:
> > the other). It is achieved by using ugly forks based on macros. The
> > platform is expected to be either POSIX like or Windows like not both.
>
> Well, why not pretend that HelenOS is more Windows like than POSIX like
> then? In this particular case - it would probably take changing one
> #ifdef. Btw, Windows are also POSIX like, at least at some level of
> abstraction.
>
> Jakub
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to