summaryrefslogtreecommitdiff
path: root/hurd/libports.mdwn
blob: 0ec0596c667c13dd124cff2561e6b275945ee39c (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
[[!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.