Re: GNU/Hurd portability patches
| От | Samuel Thibault |
|---|---|
| Тема | Re: GNU/Hurd portability patches |
| Дата | |
| Msg-id | aRuwX88mdP8tfuvi@end обсуждение исходный текст |
| Ответ на | Re: GNU/Hurd portability patches (Michael Banck <mbanck@gmx.net>) |
| Список | pgsql-hackers |
Hello,
On Mon, Nov 17, 2025 at 03:59:30PM +1300, Thomas Munro wrote:
> On Tue, Nov 11, 2025 at 10:49 AM Michael Banck <mbanck@gmx.net> wrote:
> > |login: task ./test_signalhandler(767) looked up a bogus port 23 for3205, most probably a bug.
>
> . o O { An absurdly far-fetched thought while browsing glibc/hurd glue
> code: if synchronous I/O is implemented as RPC on Mach ports, could
> that mean that it's technically possible to submit now and consume
> results later, for asynchronous I/O?
Yes, it is completely possible.
> Possibly too private/undocumented anyway,
It's not really documented much, but it's completely public. One
can include <hurd/io_request.h> and call e.g. io_read_request(port,
reply_port, offset, amount). One then has to run a msgserver loop on the
reply_port to get the reply messages. An example can be seen in the hurd
source in trans/streamio.c, for e.g. device_open_request() calls.
> I idly wondered about driving I/O directly with ports
> while studying the dismal implementation of POSIX AIO on macOS, which
> also derives from CMU Mach, but NeXT/Apple jammed file systems down
> into the unikernel part behind traditional syscalls, and it looks like
> maybe only raw devices are accessible with ports.
On MacOS, probably indeed. But GNU/Hurd POSIX files are represent as
mach port too so the usual MIG asynchronous mechanism is available.
Samuel
В списке pgsql-hackers по дате отправления: