Commit Graph

31 Commits

Author SHA1 Message Date
Christian Prochaska
2c9c7c817b libc: return 0 in 'fchmod' and 'utimes' dummies
Fixes #371.
2012-09-28 17:07:21 +02:00
Sebastian Sumpf
8ed489c4bc libc: Decrease noise level of debugging output
Changed 'libc_fs', 'libc_lwip' and 'libc/clock_gettime'
2012-09-24 09:18:00 +02:00
Sebastian Sumpf
825dc783e6 libc: Change malloc's allocator
Use slab allocators for small object sizes, do it the usual way otherwise.

This patch is related to #363. Using this optimization may be a viable
alternative to switching to the FreeBSD's malloc implementation.
2012-09-24 09:17:59 +02:00
Christian Prochaska
7f092be94c libc: allocate file descriptor sets on the stack
The 'fd_set' size calculation in the current version of the 'poll()'
function results in an  amount which is smaller than the size of the
'fd_set' data type. With this patch the file descriptor sets get
allocated as plain stack variables.

Fixes #335.
2012-08-22 16:48:35 +02:00
Norman Feske
2b5cf1342d libc: Dummy fallbacks for user and net support 2012-08-22 09:51:29 +02:00
Josef Söntgen
f2299abab5 libports: remove passwd functions from libc
Removes getpwent.c from build because the passwd facilities provided by
the FreeBSD libc will not be used anyway and add stub functions instead.
Now services which need these functions have to implement their own
(e.g. libc_noux).
2012-08-22 09:51:28 +02:00
Josef Söntgen
ed6fa86a87 libports: add gethostbyname, getservbyname dummies 2012-08-22 09:51:28 +02:00
Josef Söntgen
6fcbea000c libports: add libc_resolv
libc_resolv is a {free,get}addrinfo() plugin, mainly for use with NOUX.

We prefix the original libc functions to with 'libc_' so there is no
symbol conflict with file_operations.cc.
2012-08-22 09:51:28 +02:00
Norman Feske
d4d229bdc7 libc: Unregister region on nunmap 2012-08-22 09:51:27 +02:00
Norman Feske
4914032800 libc: Add munmap support to plugin interface
With this patch, libc plugins become able to handle munmap for regions
attached by the plugin.
2012-08-17 11:52:02 +02:00
Josef Söntgen
a6917d982a libports: add poll() to libc
Implements poll() via select() for certain programs like OpenSSH
which need it.

(This implementation is actually based OpenSSHp's compat function.)
2012-08-17 11:52:01 +02:00
Christian Prochaska
dcfcbce856 libc: add support for 'ftruncate()'
Fixes #307.
2012-08-09 11:09:43 +02:00
Josef Söntgen
8c306bde67 libports: add libc's rpc framework headers
Certain rpc headers are needed for compiling getaddrinfo.c. Unfortunatly
that means we have to generate _a few_ header files which we do when we
prepare the libc.

These header files need to be created before the symlinks. Also, some of
these header files depend on a patch. Therefore we apply the patches
first, generate the header files and in the end we create the symlinks.

Fixes #296.
2012-08-09 11:09:42 +02:00
Christian Prochaska
4caaba64c3 libc: call 'genode_exit()' in '_exit()'
With this patch the libc '_exit()' function calls the 'genode_exit()'
function to get the registered exit handlers called.

Fixes #308.
2012-07-31 12:08:58 +02:00
Josef Söntgen
d99edf57d8 libports: add _accept, _bind and _listen...
...and socketpair() dummy to libc.

Socketpair() is needed by OpenSSH. The actual implementation
should be done in libc_noux.

Fixes #297.
2012-07-23 14:05:58 +02:00
Christian Prochaska
dbd1c425bf libc: implement 'readv()'
This patch implements the 'readv()' function in the libc.

A lock guard prevents the parallel execution of either or both of the
'readv()' and 'writev()' functions.

Fixes #279.
2012-07-16 15:01:02 +02:00
Christian Prochaska
9124f303f7 libc: implement 'pread()' and 'pwrite()'
This patch implements the 'pread()' and 'pwrite()' functions in the libc.

A lock guard prevents the parallel execution of either or both functions.

Fixes #278.
2012-07-16 15:00:08 +02:00
Alexander Boettcher
ae6257dce1 Use NOVA microkernel from github, add 64bit
Use git to get recent kernels from github. Adjust NOVA patch to compile
with recent github version. Patch and use makefile of NOVA microkernel
to avoid duplicated (and outdated) makefile in Genode

Furthermore, this patch adds support for using NOVA on x86_64. The
generic part of the syscall bindings has been moved to
'base-nova/include/nova/syscall-generic.h'. The 32/64-bit specific
parts are located at 'base-nova/include/32bit/nova/syscalls.h' and
'base-nova/include/64bit/nova/syscalls.h' respectively.

On x86_64, the run environment boots qemu using the Pulsar boot loader
because GRUB legacy does not support booting 64bit ELF executables.

In addition to the NOVA-specific changes in base-nova, this patch
rectifies compile-time warnings or build errors in the 'ports' and
'libports' repositories that are related to NOVA x86_64 (i.e., Vancouver
builds for 32bit only and needed an adaptation to NOVAs changed
bindings)

Fixes #233, fixes #234
2012-06-20 19:44:07 +02:00
Josef Söntgen
896d12d0b8 Add writev() to libc
This function is needed by perror(3).

Closes #239.
2012-06-08 14:33:15 +02:00
Josef Söntgen
30fe9d1912 Extend libc with libresolv functionality
This commit enables libc's own libresolv and its dependencies.
2012-05-29 13:54:59 +02:00
Norman Feske
95766bd4a1 Let mmap return aligned anonymous memory 2012-05-18 17:04:52 +02:00
Christian Prochaska
12e1ae9d72 Implement '_nanosleep()'
This patch provides an implementation of the '_nanosleep()' libc function,
which blocks on a timed semaphore for the given time, but at least 10ms.
This should result in better performance than creating a timer connection
on every call (for thread-safety), but could still be improved.

Fixes #158.
2012-03-21 22:05:55 +01:00
Christian Prochaska
2d290c0898 Preliminary 'log2()' and 'log2f()' implementation
The 'log2()' and 'log2f()' functions have been added in FreeBSD's libc
version 9.0.0, but they are missing in version 8.2.0, which is used in
Genode. This patch provides preliminary implementations of these
functions until the Genode libc gets updated to version 9.0.0 or above.

Fixes #143.
2012-03-08 10:42:21 +01:00
Norman Feske
1a833ebd30 Allow for overriding time-related libc functions
If using the libc for Noux programs, the default implementation of these
functions cannot be used because they rely on a dedicated
timeout-scheduler thread. Noux programs, however, are expected to
contain only the main thread. By turning the functions into weak
symbols, the noux libc-plugin can provide custom implementations.
2012-02-23 10:42:11 +01:00
Julian Stecklina
c7890c9423 Set ENOSYS for all libc dummies
This is a brute-force approach to issue #102. This might be a bit too
much. I don't know if we can clobber errno for all of those?
2012-02-14 16:44:43 +01:00
Julian Stecklina
1db46a2345 Parameter passing to libc's open and fcntl, fix #73
By including the relevant headers, this problem is prevented in the
future because the compiler will complain.
2012-01-12 09:17:36 +01:00
Julian Stecklina
3c54d39307 Provide a default implementation of chdir, fix #68
The default implementation relies on the sequence open, fchdir, close.
Enable this implementation for the Noux libc plugin.
2012-01-12 09:17:14 +01:00
Norman Feske
c4adddb6b7 Add libc/compat to libc, fix #63 2012-01-06 13:21:29 +01:00
Norman Feske
08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Norman Feske
d09c7e699e Direct _ioctl to libc plugin interface
Removed dummy implementation of '_ioctl'. This function is called
internally within the libc, i.e., by 'tcgetattr'. For running
libreadline in Noux, we need to hook into those ioctl operations via
the libc plugin interface.
2012-01-02 17:09:18 +01:00
Genode Labs
da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00