On Sat, May 1, 2021 at 8:48 PM Samuel Thibault <samuel.thiba...@gnu.org> wrote: > Since this is not part of the main hurd repo there is no copyright > assignment requirement, so you can put your name. You can also assign > copyright and then put the FSF name.
OK, I'll put my own name for now then. I'm fine with assigning copyright to FSF if that's required for contributing to the main repo; but I've heard it's a long complicated process that involves physically sending papeps overseas & getting an ack from my employer. Is that true? Could you (or somebody) guide me through it? > > The idea was that NODE_INFO(node)->pager does *not* itself keep a hard > > reference on the pager (create_pager () calls ports_port_deref (pager) > > after pager_get_port ()), so once all the pager clients are gone, the > > memory object would get garbage-collected, which would call > > pager_clear_user_data (), which sets NODE_INFO(node)->pager = NULL. > > Does that also destroy the pager? Doesn't it? Here's my understanding of how this works (or should work): * Ports (as in struct port_info) are reference counted. One can hold explicit references on them (with ports_port_[de]ref ()); a reference is also acquired and dropped implicitly by MIG intran/outtran. The port also gets ref'ed when you do ports_get_right (); this reference is then automatically dropped once there are no longer any send rights left. (I don't quite understand how that last one works, yet.) So overall, a port is alive while it's either referenced by something in-process, or has clients. * Pagers from libpager use this mechanism. Once nothing in the process references a pager and all the send rights to it are gone (so, after memory_object_terminate ()), the pager gets destroyed by the reference counting mechanism. It is then when pager_clear_user_data () is called, among other things. * In my implementation, nothing in the tarfs process holds references on pagers, so each pager should get destroyed as there are no send rights to it, i.e. as soon as Mach terminates it. -- Sergey