[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrapper around macro around ...???
From: |
Thomas Bushnell, BSG |
Subject: |
Re: Wrapper around macro around ...??? |
Date: |
27 Nov 2001 10:26:09 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
nisse@lysator.liu.se (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.