[EMAIL PROTECTED] (Niels Möller) writes:

> I don't understand all the details of HURD_PORT_USE, like the struct
> hurd_userlink argument that is passed to _hurd_port_get and
> _hurd_port_free, or what information, besides a mach_port_t, is stored
> in a struct hurd_port.

The userlink argument is just a structure that HURD_PORT_USE will use
to keep track of all the current users of the port (because it isn't
supposed to get deallocated until both the descriptor is closed *and*
all current uses have finished).  So callers of HURD_PORT_USE need to
set aside a little bit of memory (generally on the stack) and provide
it to HURD_PORT_USE for it to keep track of this.

A struct hurd_port is just a mach_port_t with that other stuff that is
used to keep track of pending callers to properly synchronize close
operations.

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to