summaryrefslogtreecommitdiff
path: root/glibc/file_descriptor.mdwn
blob: 78c496b14ccca912999974e17e5ea1a60f44274d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[[!meta copyright="Copyright © 2010, 2014 Free Software Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

A [[UNIX file descriptor|unix/file_descriptor]] is implemented in [[glibc]] by
using operations on objects referred to by [[Mach
ports|microkernel/mach/port]]).


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

[[!tag open_issue_documentation]]

    <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