summaryrefslogtreecommitdiff
path: root/cpu/sysdeps/README
blob: 461226e3576ccc2269ee8f1f755eb926eff25d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
LibMCPU HOST sysdeps
====================

This tree is the HOST-dependent adaptation layer for MCPU system-call wrappers.
configure builds the ordered `sysnames` search list from the canonical HOST,
architecture preconfigure fragments, the ABI/data model and Implies inheritance.
cpu/Makefile.am uses that ordered list as the GNU make `vpath %.c` search path,
so the first matching basename is the selected source.

The search order is intentionally from the most specific implementation to the
most generic implementation.  `cpu/sysdeps/generic` is always last.  A generic
directory does not by itself make an otherwise unknown HOST supported.

Starting with LibMCPU 0.3.25 raw HOST errno values must not escape this layer.
The inherited `sys-errno.c` implementation provides `__cpu_errno_from_host()`;
HOST syscall wrappers translate a real HOST failure into the stable MCPU errno
namespace before returning to common CPU code.  Errors created by the MCPU ABI
itself use `__MCPU_E*` constants directly and are not sent through the HOST
translator.