Commit Graph

8887 Commits

Author SHA1 Message Date
Norman Feske
e0ee56275e vfs_lwip: fix switch fall-through
Pointed out by a compiler warning.
2019-11-19 14:10:55 +01:00
Norman Feske
418ac4c560 libc: remove global watch() function
This patch replaces the function with a 'Watch' interface to be
explicitly passed to the caller (currently only time.cc).

Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske
5f5d709c07 libc: remove global libc_config()
Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske
89a38723bd libc: reimplement passwd handling
- Eliminate call of global libc_config()
- Remove dynamic memory allocation, const cast
- Prepare for moving the state from compilation unit to header
- Fix run/libc_getpwent.run

Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske
648bcd1505 libc: unify use of namespaces
This patch unifies the patterns of using the 'Genode' and 'Libc'
namespaces.

Types defined in the 'internal/' headers reside in the 'Libc'
namespace. The code in the headers does not need to use the
'Libc::' prefix.

Compilation units import the 'Libc' namespace after the definition of
local types. Local types reside in the 'Libc' namespace (and should
eventually move to an 'internal/' header).

Since the 'Libc' namespace imports the 'Genode' namespace, there is
no need to use the 'Genode::' prefix. Consequently, code in the
compilation units rarely need to qualify the 'Genode' or 'Libc'
namespaces.

There are a few cases where the 'Libc', the 'Genode', and the global
(libc) namespaces are ambigious. In these cases, an explicit
clarification is needed:

- 'Genode::Allocator' differs from 'Libc::Allocator'.
- 'Genode::Env' differs from 'Libc::Env'.
- Genode's string functions (strcmp, memcpy, strcpy) conflict
  with the names of the (global) libc functions.
- There exist both 'Genode::uint64_t' and the libc'c 'uint64_t'.

Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske
bf92232698 libc: split task.cc into multiple files
This patch is the first step of re-organizing the internal structure of
the libc. The original version involved many direct calls of global
functions (often with side effects) across compilation units, which
made the control flow (e.g., the initialization sequence) hard to
follow.

The new version replaces those ad-hoc interactions with dedicated
interfaces (like suspend.h, resume.h, select.h, current_time.h). The
underlying facilities are provided by the central Libc::Kernel and
selectively propagated to the various compilation units. The latter is
done by a sequence of 'init_*' calls, which eventually will be replaced
by constructor calls.

The addition of new headers increases the chance for name clashes with
existing (public) headers. To disambiguate libc-internal header files
from public headers, this patch moves the former into a new 'internal/'
subdirectory. This makes the include directives easier to follow and the
libc's source-tree structure more tidy.

There are still a few legacies left, which cannot easily be removed
right now (e.g., because noux relies on them). However, the patch moves
those bad apples to legacy.h and legacy.cc, which highlights the
deprecation of those functions.

Issue #3497
2019-11-19 14:10:55 +01:00
c6c7870a29 Fix bad include path in genode-base.pc
Add the top-level of include to the search path, not include/base.
2019-11-14 08:56:19 +01:00
0b427b65aa Tup: build vfs_import 2019-11-10 13:41:49 +01:00
c2a543ed20 test/log: exit when complete 2019-11-10 13:40:40 +01:00
1dc25293b8 Startup library header path must be overriden
The startup library might fail at runtime if local headers are included
rather than headers from somewhere else.
2019-10-28 15:25:18 +01:00
3bf1cc09eb Move startup library to a Tup group 2019-10-28 11:32:29 +01:00
fa0c527732 Revert changes to closing of remote VFS handles 2019-10-28 11:32:29 +01:00
29613c217b Tup: increase default optimization level to -O2 2019-10-28 11:32:29 +01:00
be04cfe899 Remove spec_includes replacements from pkg-config 2019-10-28 11:32:29 +01:00
f037044ec5 Move Tup rules local to this repo to "repos"
Make the top-level Tuprules.tup generic enough to be shared with other projects.
2019-10-28 11:32:29 +01:00
ecd0252b40 Publish core-nova.o in dev output 2019-10-28 11:32:29 +01:00
4921168eda test/vfs_stress: annotate switch label fall-throughs
This test was written for speed, not correctness.

Fixes #3516
2019-10-28 11:32:29 +01:00
af52274972 Tup: add x86 drivers from os repo 2019-10-28 11:32:29 +01:00
f931ce2e19 Clang: address of packed member 2019-10-28 11:32:29 +01:00
ac8fb6702a Clang: do not use angle brackets for local includes 2019-10-28 11:32:29 +01:00
c67d81dc99 Tup: rename INCLUDES to CPPFLAGS 2019-10-28 11:32:29 +01:00
3c8117e555 Clang: uninitialized 2019-10-28 11:32:29 +01:00
a7a0d3fe63 Refactor Tup, flatten output directories
Make no attempt to replicate the depot layout.
2019-10-28 11:32:29 +01:00
d348e96b84 base-common: copy all sparse ELF segments, including read-only 2019-10-28 11:32:29 +01:00
5e87eee9b8 Genode::Capability_space: bypass static constructor where possible 2019-10-04 00:52:03 +02:00
6e9f9ce3a8 Core includes untangling
Express convoluted include walks directly in code, do not hide them
in build scripts.
2019-10-04 00:52:02 +02:00
a83ffd4821 Multiple inheritance considered harmful 2019-10-04 00:52:02 +02:00
d07ff84f5c Tup: remove gems 2019-10-04 00:52:02 +02:00
790b82a88d Tup: reduce output path variables 2019-10-04 00:52:02 +02:00
65d7eff10f Tup: strip down configuration options
Autodetect x86, remove conditional NOVA builds.
2019-10-04 00:52:02 +02:00
228bb4f189 Tup: Remove rules for generating Dhall manifest 2019-10-04 00:52:02 +02:00
d0865d365c Tup: do not take local includes from pkg-config 2019-10-04 00:52:02 +02:00
2d7dff54ec Tup Reorder includes 2019-10-04 00:52:02 +02:00
5587f0992b Tup: build static libraries into the dev output 2019-10-04 00:52:02 +02:00
7d7659635c Suffix PKG_CONFIG_PATH with Nix inputs 2019-10-04 00:52:02 +02:00
5682ad8e2b Add base tests 2019-10-04 00:52:02 +02:00
7d384bc3e6 Adjust for Nix environment
Use a LIBUNWIND and LIBUNWIND_BAREMETAL, adjust shell.nix to use
"base" from the  new split repository builds.
2019-10-04 00:52:02 +02:00
5a8686eaf9 Compatibility with LLVM libunwind 2019-10-04 00:52:02 +02:00
4e94dd4265 Remove dead code 2019-10-04 00:52:02 +02:00
a7f4384b12 Clang: undeclared identifier __UINT64_C 2019-10-04 00:52:02 +02:00
02365c171e Clang: no reference members to stack parameters 2019-10-04 00:47:17 +02:00
075ab46d39 Clang: do not use angle brackets for local includes 2019-10-04 00:47:17 +02:00
d52f74c7c2 Clang: remove user of register keyword 2019-10-03 22:07:28 +02:00
44f2c86a91 Clang: implement memset local to C++ runtime
Using Genode::memset with Clang results in recursion.
2019-10-03 22:06:34 +02:00
f42e7f1ff4 Clang: unused lamba capture 2019-10-03 22:06:34 +02:00
b50d28c3e4 Clang: align after template expansion
Cannot align template structs. Also, cannot cast void* to addr_t in
constexpr function.
2019-10-03 22:06:34 +02:00
d557624469 Clang: need a GCC diagnostic push for every pop 2019-10-03 22:06:34 +02:00
221320af47 Clang: ignore mismatched struct/class tags 2019-10-03 22:06:34 +02:00
2d60fc9f65 Clang: do not link with libgcc.a 2019-10-03 21:57:57 +02:00
c39507e591 Clang: tautological-undefined-compare 2019-10-03 21:57:57 +02:00