Commit Graph

65 Commits

Author SHA1 Message Date
Christian Prochaska
ff3e08f9ea POSIX threads and semaphores
This patch implements a subset of the POSIX thread and semaphore functions
in the 'pthread' library.

Fixes #174.
2012-04-16 12:16:40 +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
Norman Feske
cca4b7b43c Change include order to remedy conflicting defines
Both the libc and the NOVA syscall bindings provide the definition of
PAGE_SIZE. In contrast to the libc, which uses a #define, the NOVA
syscalls uses a proper enum value. Thus, we can work around the conflict
by including the NOVA syscalls header prior the libc header. Fixes #152.
2012-03-16 14:45:54 +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
Norman Feske
54cb49583b Libc plugin for using file I/O on ROM dataspaces 2012-02-14 16:44:42 +01:00
Norman Feske
9e3ecade16 Replace Framebuffer::info by Framebuffer::mode
As a preliminary step for working on issue #11, this patch revisits the
'Framebuffer::info' RPC call. Instead of using C-style out paramters,
the new 'mode()' RPC call returns the mode information as an object of
type 'Mode'. Consequently, mode-specific functions such as
'bytes_per_pixel' have been moved to the new 'Framebuffer::Mode' class.
2012-01-25 13:27:47 +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
8cb27e2813 Let tcgetattr succeed for libc_log
At the startup of python's termios module, a sequence of 'tcgetattr' and
'tcsetattr' calls is executed. If one of those calls fails, the
initialization gets canceled. 'tcgetattr' is implemented via ioctl
operations on stdout. To let those operations succeed, the default
implementation of ioctl ('Plugin::ioctl') cannot be used because it
returns -1. Adding a dummy ioctl to the libc_log back end alleviates
this problem.
2012-01-06 19:07:34 +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