summaryrefslogtreecommitdiff
path: root/hurd/libports.mdwn
blob: 6f2cd46dc753319e41c787cce8cb34dc0e1683b4 (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
[[!meta copyright="Copyright © 2010, 2011 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]]."]]"""]]

*libports* is a convenience library for easier handling of [[Mach
ports|microkernel/mach/port]].  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.  ([[!taglink
open_issue_hurd]]: [[open_issues/multithreading]].)

Also, there are configurable timeouts for [[translator]]s who want to go away
when they are not used.  ([[!taglink open_issue_hurd]]: there used to be bugs
in this area, [[!message-id "87hev152we.fsf@becket.becket.net"]], but it may be
fixed as of [[!message-id "20111030210045.GA4983@myhost"]],
[[!GNU_Savannah_Git_hurd_hurd 9b5429e834cde56f73b8ff605e36afc7d9bb6e1b]].)