Commit Graph

22 Commits

Author SHA1 Message Date
Norman Feske 560a58e5c6 Move packet stream to Genode namespace, fix #1455 2015-03-19 08:57:22 +01:00
Norman Feske 001b069509 Simplify base/semaphore.h, fix #1453 2015-03-19 08:57:21 +01:00
Norman Feske e8336acafc base,os: Coding-style unification
Fixes #1432
2015-03-13 12:17:23 +01:00
Christian Prochaska 70540e6f8e Improve 'Timed_semaphore' accuracy
Fixes #1421
2015-02-27 11:48:07 +01:00
Alexander Boettcher 95ff5ba11d base: support range restriction in allocator
Issue #696
2015-02-16 13:40:38 +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
Norman Feske 2f5cff5347 os: add 'Attached_dataspace::invalidate' 2014-10-13 15:21:54 +02:00
Norman Feske 28119e3536 os: add 'Reporter::name' accessor 2014-10-13 15:21:54 +02:00
Norman Feske 3a1ecdd5a7 os: fix race in 'os/child_policy_dynamic_rom.h' 2014-10-13 15:21:53 +02:00
Norman Feske c48a4ebce8 os: add texture_rgb888.h and texture_rgb565.h
The headers 'texture_rgb565.h' and 'texture_rgb888' contain
template specializations needed for using the 'Texture::rgba' function
for the respective pixel formats. The specializations were formerly
contained in application-local code.
2014-10-13 15:21:53 +02:00
Norman Feske 40d92b7cec os: improve alpha-channel support for Pixel_rgba
This patch add an optional alpha argument to the constructor, which may
be passed to a pixel type representing an alpha channel. Furthermore,
a new overload of the mix function has been added to accommodate use
cases where one texture is applied to both a pixel surface and an alpha
channel.
2014-10-13 15:21:53 +02:00
Norman Feske b01c74ae12 os: define ALPHA8 pixel format 2014-10-13 15:21:53 +02:00
Norman Feske eab1febd0d os: add RGB888 pixel format 2014-08-21 12:54:35 +02:00
Norman Feske c652655bcb Add Rom_session::update
The new Rom_session::update function can be used to request the update of
an existing ROM dataspace. If the new data fits into the existing
dataspace, a subsequent call of 'dataspace' can be omitted. This way,
ROM dataspace updates don't suffer from page-fault-handling costs that
would occur when replacing the dataspace with each update.
2014-08-11 15:55:31 +02:00
Norman Feske 9d7270b174 os: Slave config with non-zero-terminated strings 2014-08-11 15:55:31 +02:00
Norman Feske 8768a6dae2 os: New utility for managing object handles
Some session interfaces use session-local handles for referring to
server-side objects, e.g., a file-system session hands out file handles
to the client. The new 'Handle_registry' class template can be used to
associate numeric handles with objects on the server side and thereby
simplifies the implementation of such servers.
2014-08-11 15:55:31 +02:00
Alexander Boettcher ca9f0ba89c os: extend on_alarm() by unsigned count value
The count value can be used to batch timeouts. I.e., if a periodic
timeout triggered multiple times before the timer had a chance to
process them, the count corresponds to the number of passed periods.
2014-07-09 16:26:05 +02:00
Christian Helmuth f7a7421091 Configurable clearing of array in Bit_array_base
Fixes #1177.
2014-07-09 16:26:04 +02:00
Norman Feske b6f8bcca6a os: Add Input::Event_queue::reset function
Resetting the input-event queue is useful for error handling.

Issue #1185
2014-06-27 14:07:03 +02:00
Stefan Kalkowski 42397cb512 os: avoid deadlock in packet stream (fix #1186)
Respectively resend a packet-stream-not-empty signal when a new signal handler
gets registered.
2014-06-26 12:14:03 +02:00
Stefan Kalkowski 786fe805da base: introduce caching attributes (fix #1184)
On ARM it's relevant to not only distinguish between ordinary cached memory
and write-combined one, but also having non-cached memory too. To insert the
appropriated page table entries e.g.: in the base-hw kernel, we need to preserve
the information about the kind of memory from allocation until the pager
resolves a page fault. Therefore, this commit introduces a new Cache_attribute
type, and replaces the write_combined boolean with the new type where necessary.
2014-06-26 10:57:26 +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