A UNIX file descriptor is implemented in glibc by using operations on objects referred to by Mach ports).

IRC, freenode, #hurd, 2013-11-29

<gnu_srs> Hi, are there any advantages to use the __USEPORT and
  HURD_DPORT_USE etc macros?
<braunr> some things don't work without htem
<teythoon> I wondered that too
<teythoon> could you be more specific ?
<braunr> i can try
<braunr> __USEPORT is merely a wrapper to HURD_DPORT_USE
<braunr> HURD_PORT_USE handles concurrent access to ports
<braunr> is that enough ?
<teythoon> so not using these makes loading the port name racy ?
<braunr> shared ones, yes
<braunr> mostly, file descriptors
<teythoon> ok
<teythoon> so yes, that's reason enough ;)
<gnu_srs> so even if file descriptor ports are not accessed, it's use is
  preferred?
<gnu_srs> I assume the answer is yes:-D
<braunr> gnu_srs: not accessed ?
<gnu_srs> file descriptor ports not used, but e.g. auth ports
<gnu_srs> there is code in hurd and eglibc sometimes using the macros,
  sometimes not
<braunr> the macro is used when ports are shared
<braunr> or can be shared
<gnu_srs> k!, thanks