Commit Graph

48 Commits

Author SHA1 Message Date
Christian Prochaska 0fd53c7fe4 Extract numeric string arguments with the correct signedness
There are lots of places where a numeric argument of an argument string
gets extraced as signed long value and then assigned to an unsigned long
variable. If the value in the string was negative, it would not be
detected as invalid (and replaced by the default value), but become a
positive bogus value.

With this patch, numeric values which are supposed to be unsigned get
extracted with the 'ulong_value()' function, which returns the default
value for negative numbers.

Fixes #1472
2015-04-13 14:18:15 +02:00
Alexander Boettcher 97758f8468 libc: use correct type for dummy libc functions
as far as possible. Some functions are internal to libc and no public
header are available.

Fixes #1466
2015-03-27 11:53:16 +01:00
Josef Söntgen 2d469cb35c lwip: packet-stream/link-state signals in recv thread
Issue #1327
2015-03-27 11:53:14 +01:00
Josef Söntgen 6c6375aa83 lwip: use netifapi
The netifapi makes sure, that all operations are done in the context of
the tcpip-thread.

Issue #1327.
2015-03-27 11:53:14 +01:00
Josef Söntgen 5518a21692 lwip: clean up patches
Issue #1327.
2015-03-27 11:53:13 +01:00
Norman Feske 560a58e5c6 Move packet stream to Genode namespace, fix #1455 2015-03-19 08:57:22 +01:00
Christian Helmuth d6f9725548 libc: fix compiler warning (issue #1434) 2015-03-13 12:17:24 +01:00
Christian Helmuth 2cd902f09f libc: warn on configuration errors in rtc wrapper
Fixes #1336.
2015-01-06 12:39:11 +01:00
Christian Helmuth 77410a08a8 libc: remove debug messages from vfs plugin 2015-01-06 12:39:10 +01:00
Christian Prochaska 21154d6866 qt5: let QNitpickerViewWidget react to focus event
With this patch, when calling 'setFocus()' on a QNitpickerViewWidget, the
Nitpicker view gets the input focus (provided that the parent Qt window
already had it).

Fixes #1314
2014-12-04 16:26:22 +01:00
Alexander Boettcher f970e4a71b libc: support F_SETFD && FD_CLOEXEC ioctl
Issue #1308
2014-12-01 17:29:17 +01:00
Alexander Boettcher c40aa45d86 pthread: support pthread_key_delete
Issue #1296
2014-11-28 12:02:39 +01:00
Martin Stein 8f9355b360 thread API & CPU session: accounting of CPU quota
In the init configuration one can configure the donation of CPU time via
'resource' tags that have the attribute 'name' set to "CPU" and the
attribute 'quantum' set to the percentage of CPU quota that init shall
donate. The pattern is the same as when donating RAM quota.

! <start name="test">
!   <resource name="CPU" quantum="75"/>
! </start>

This would cause init to try donating 75% of its CPU quota to the child
"test".  Init and core do not preserve CPU quota for their own
requirements by default as it is done with RAM quota.

The CPU quota that a process owns can be applied through the thread
constructor. The constructor has been enhanced by an argument that
indicates the percentage of the programs CPU quota that shall be granted
to the new thread. So 'Thread(33, "test")' would cause the backing CPU
session to try to grant 33% of the programs CPU quota to the thread
"test". By now, the CPU quota of a thread can't be altered after
construction. Constructing a thread with CPU quota 0 doesn't mean the
thread gets never scheduled but that the thread has no guaranty to receive
CPU time. Such threads have to live with excess CPU time.

Threads that already existed in the official repositories of Genode were
adapted in the way that they receive a quota of 0.

This commit also provides a run test 'cpu_quota' in base-hw (the only
kernel that applies the CPU-quota scheme currently). The test basically
runs three threads with different physical CPU quota. The threads simply
count for 30 seconds each and the test then checks wether the counter
values relate to the CPU-quota distribution.

fix #1275
2014-11-28 12:02:37 +01:00
Christian Prochaska 2f5fbe73d3 q5: 'QTime::currentTime()' fix
Fixes #1298
2014-11-28 12:02:37 +01:00
Alexander Boettcher cdcc4ee60f pthread: support pthread_once
Issue #1296
2014-11-20 17:10:07 +01:00
Norman Feske 21f013d2c4 libports/sdl: fix keycode for return key 2014-11-12 14:44:17 +01:00
Christian Helmuth e708bbe2c6 libc: do not zero errno on success in vfs plugin
The manpage to errno tells the following story:

The <errno.h> header file defines the integer variable errno, which is
set by system calls and some library functions in the event of an error
to indicate what went wrong. Its value is significant only when the
return value of the call indicated an error (i.e., -1 from most system
calls; -1 or NULL from most library functions); a function that
succeeds is allowed to change errno.

Valid error numbers are all nonzero; errno is never set to zero by any
system call or library function.
2014-11-12 14:44:16 +01:00
Sebastian Sumpf 5a821d4c92 base: Genode's dynamic linker
Issue #1280
2014-11-12 14:44:15 +01:00
Christian Prochaska 443dc1f71d sdl: evaluate the motion event type
Fixes #1272
2014-10-10 13:02:46 +02:00
Christian Prochaska 2db563ebdd libc_lwip: 'fcntl()' fix
Fixes #1273
2014-10-10 13:02:46 +02:00
Christian Prochaska 363ffe40a0 qt5: support window resizing by window manager
Fixes #1268
2014-10-10 13:02:38 +02:00
Alexander Boettcher 8b8c2713ae vfs: use 64bit for file offset and size
Fixes #1246
2014-10-10 13:02:28 +02:00
Josef Söntgen 1a170e9caf libports: add vfs_jitterentropy library
This file system library uses the the jitterentropy library to provide
a rudimentary '/dev/random' device.

Fixes #1239.
2014-08-26 11:00:13 +02:00
Josef Söntgen 2f46930824 libports: add jitterentropy-20140411
This commit adds a port the jitterentropy library to Genode. As
backend on x86_{32,64} 'rdtsc' is used and on ARMv{6,7} the
performance-counter.

Fixes #1239.
2014-08-26 11:00:13 +02:00
Josef Söntgen 2bf67136c6 libc: add support for external vfs file systems
These file systems are provided on-demand by loading a shared library
when the fstab node is traversed. By convention this library is named
after the file system it provides. For example a file system that
provides a 'random' file system node is called 'vfs_random.lib.so'. It
is still possible to give the the node another name in the vfs. The
following code snippts illustrates this matter:

! [...]
! <config>
!   <libc>
!     <vfs>
!       <dir name="dev"> <jitterentropy name="random"/> </dir>
!     </vfs>
!   </libc>
! </config>
! [...]

Here the jitterentropy file system, implemented in
'vfs_jitterentropy.lib.so' provides a file system node named 'random'
in the 'dev' directory. When traversing the vfs section the libc will
try to load 'vfs_jitterentropy.lib.so' but programs may access the
file system only via '/dev/random'.

Fixes #1240.
2014-08-22 16:16:41 +02:00
Josef Söntgen c745aa4454 libc: utilize Rtc_file_system in time functions
Fixes #1241.
2014-08-22 16:16:41 +02:00
Josef Söntgen ebc07949ff libc: add support for Rtc_file_system
Fixes #1241.
2014-08-22 16:16:41 +02:00
Josef Söntgen 4cab202d8a libcrypto: remove MD2, RC5 and store
Remove components that are disabled upstream.

Fixes #1236.
2014-08-22 16:16:41 +02:00
Josef Söntgen e23a0c8a13 openssl: use Genode specific RAND backend
The backend merely provides simpler access to '/dev/random' because
on Genode the common random device checks are unnecessary.

Fixes #1236.
2014-08-22 16:16:40 +02:00
Christian Prochaska 4973f2a310 Qt5: migrate to new ports mechanism
Fixes #1233.
2014-08-22 16:16:40 +02:00
Christian Prochaska 2f7167fab2 Qt5: use double buffering
Fixes #1229.
2014-08-18 13:28:29 +02:00
Christian Prochaska a189135940 Qt5: fix menu problems
- fix sub menu positioning
- disable window decoration for popup menus

Fixes #1226.
2014-08-18 13:27:38 +02:00
Norman Feske dc2da978f4 qt5: Adapt qpluginwidget new nitpicker/loader
The QPluginWidget used to be a QNitpickerViewWidget but the new loader
interface does no longer hand out a view capability. So we need to
decouple both classes. This patch moves the view-geometry calculation to
a separate class to make it easier reusable, in particular for the
QPluginWidget.
2014-08-13 12:07:55 +02:00
Norman Feske 91e01411a4 nitpicker: Reworked session interface
This patch changes nitpicker's session interface to use session-local
view handles instead of view capabilities. This enables the batching
of multiple view operations into one atomic update.
2014-08-11 15:55:32 +02:00
Norman Feske 867a7018e8 qt5: implement QNitpickerPlatformWindow::raise
This function is needed to bring menus on top.
2014-07-25 12:14:18 +02:00
Norman Feske bb83c0d3da mesa: apply patches (fix #1193) 2014-06-27 14:05:50 +02:00
Alexander Boettcher a6fdd68154 pthread: remove obsolete warning avoidance
Issue #1188
2014-06-26 12:06:15 +02:00
Christian Prochaska 4672ae637a Qt5: set the parent view of a QPluginWidget's view
For the correct integration of a QPluginWidget in a parent QWidget, with
this commit the parent QWidget's Nitpicker view is made the parent view of
the plugin's Nitpicker view.

Fixes #1173.
2014-06-26 10:57:25 +02:00
Christian Prochaska 5ea772d284 Qt5: don't create superfluous Nitpicker buffer
When Qt creates a Nitpicker session for determining the screen resolution,
it is not necessary to create a Nitpicker buffer.

Fixes #1166.
2014-06-26 10:57:24 +02:00
Christian Prochaska a12b7edc06 Qt5: handle dialog windows as top-level windows
Fixes #1164.
2014-06-06 14:54:32 +02:00
Christian Prochaska 70e51c0632 Qt5: don't create Nitpicker views for desktop widgets
Fixes #1163.
2014-06-06 14:54:31 +02:00
Christian Prochaska 023afebba1 Qt5: constrain the window buffer refresh area
With this patch, the information about the changed window area is taken
into account when refreshing the Nitpicker buffer.

Fixes #1132.
2014-06-06 14:54:08 +02:00
Christian Prochaska 17c22b2ac9 Qt5: use the Genode main thread
Now that it is possible to resize the stack of the Genode main thread, it
is not necessary anymore to create a new Genode thread as Qt main thread.

Fixes #1134.
2014-06-06 14:54:08 +02:00
Christian Prochaska db89c85954 Qt5: ARM-related improvements
- fix compile errors when building for ARM
- use the correct device drivers in Qt run scripts

Fixes #1154.
2014-05-27 11:14:45 +02:00
Josef Söntgen 0a0f0031a4 libports: enable curl on arm 2014-05-27 11:14:45 +02:00
Christian Prochaska ea79c0e2e9 openssl: add ARM support
Fixes #1136.
2014-05-27 11:14:45 +02:00
Norman Feske 85a2ebc1c4 libports: migrate to new ports mechanism
Issue #1082
2014-05-27 11:14:42 +02:00
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00