libports is a convenience library for easier handling of Mach ports. It is documented in the Reference Manual.

libports is not (at least, not for now) a generalization / abstraction of Mach ports to the functionality the Hurd needs, that is, it is not meant to provide an interface independently of the underlying microkernel.

libports does not itself depend on libthreads, but the appropriate threading hooks are used if present, that is if libthreads is used by another component.

Message Processing

ports_manage_multithreaded

When a message is recieved, the thread acting as receiver checks if any other thread is also waiting for requests. If there is none, a new thread is spawned. Thus, the current thread continues processing the message while the newly created thread starts listening for new ones. (open issue hurd: multithreading.)

Also, there are configurable timeouts for translators who want to go away when they are not used. (open issue hurd: there used to be bugs in this area, id:"87hev152we.fsf@becket.becket.net", but it may be fixed as of id:"20111030210045.GA4983@myhost", hurd/hurd.git commit 9b5429e834cde56f73b8ff605e36afc7d9bb6e1b.)