Commit Graph

34 Commits

Author SHA1 Message Date
Christian Helmuth
76cd788479 Fix some typos 2013-11-26 14:32:06 +01:00
Christian Prochaska
cf040e2833 Ring_buffer: make synchronization optional
With this patch, the 'Ring_buffer' class can be made unsynchronized by
setting the 'Ring_buffer_unsynchronized' policy as third template
argument.

Fixes #922.
2013-10-22 08:00:16 +02:00
Christian Prochaska
dc8fc1a33c Ring_buffer: add 'avail_capacity()' function
The 'avail_capacity()' function returns how many more elements would
currently fit into the ring buffer.

Fixes #921.
2013-10-22 08:00:15 +02:00
Norman Feske
9cf677cb0a os: Add resource balancing-support to 'Slave'
In order to be able to dynamically balance resources of slaves, we need
to provide an accessor to the slave's RAM session and a way to issue
yield requests.
2013-10-15 16:13:45 +02:00
Norman Feske
c9194a2af4 attached_mmio: Support sub-page MMIO resources 2013-09-23 14:26:01 +02:00
Norman Feske
6575856624 os: Split Session_label from Session_policy
By splitting Session_policy into two classes, we make it more flexible.
Originally, the constructor accepted solely an args string, which made it
unusable for situations where we already have extracted the session
label (e.g., stored in the session meta data of a server). Now, the
extraction of the label from the args string is performed by the new
Session_label class instead, which, in turn, can be passed to the
constructor of Session_policy.

This change causes a minor API change. The following code

  Session_policy policy(session_args);

Must be turned into

  Session_label  label(session_args);
  Session_policy policy(label);
2013-09-23 14:25:59 +02:00
Norman Feske
7e35388336 os: Skeleton for server implementations 2013-09-23 14:25:58 +02:00
Norman Feske
94bcd3f1bf os: New Signal_rpc_dispatcher utility
The so-called Signal_rpc_dispatcher delegates the handling of signals to
the context of an RPC entrypoint.
2013-09-23 14:25:58 +02:00
Norman Feske
8243329ad4 os: Move Genode::Config into 'config' library
Originally, the convenience utility for accessing a process
configuration came in the form of a header file. But this causes
aliasing problems if multiple compilation units access the config while
the configuration gets dynamically updated. Moving the implementation of
the accessor to the singleton object into a library solves those
problems.
2013-09-23 14:25:58 +02:00
Norman Feske
a1effc5ad8 make Attached_ram_dataspace::local_addr const 2013-09-18 14:58:55 +02:00
Stefan Kalkowski
4254cb04e1 Reduce IPC with timer service in timed semaphore
Instead of using msleep to sleep periodically, and then increase jiffies
counter in the alarm scheduler implementation of the timed semaphore
use the 'trigger_periodic' call introduced by the change of the timer session
interface into an asynchronous one. Thereby, we can reduce the necessary IPC
communication with the timer service effectively.

Ref #35
2013-08-30 13:38:21 +02:00
Norman Feske
6d837c9e26 Attach affinity information to session requests
This patch extends the 'Parent::session()' and 'Root::session()'
functions with an additional 'affinity' parameter, which is inteded to
express the preferred affinity of the new session. For CPU sessions
provided by core, the values will be used to select the set of CPUs
assigned to the CPU session. For other services, the session affinity
information can be utilized to optimize the locality of the server
thread with the client. For example, to enable the IRQ session to route
an IRQ to the CPU core on which the corresponding device driver (the IRQ
client) is running.
2013-08-13 17:08:25 +02:00
Martin Stein
1a7efc0df1 os: helper Attached_mmio
Genode::Attached_mmio is the fusion of Genode::Attached_io_mem_dataspace
and Genode::Mmio.

Ref #706
2013-05-22 18:32:05 +02:00
Norman Feske
78204b8f49 Utility for synchronizing interface calls 2013-05-17 12:04:45 +02:00
Alexander Boettcher
30927f68a7 check wakeup situation in rx() after dequeuing
Issue #593
2013-04-26 16:48:54 +02:00
Norman Feske
fe734272bc Make 'config()' convenience utility more robust
This patch improves the config handling by falling back to a static
string (empty "<config />") if no valid config ROM module could be
found. This can happen initially, but also at runtime when the ROM
module dissapears, e.g., a ROM module accessed via fs_rom where the
corresponding file gets unlinked.
2013-01-15 10:18:11 +01:00
Norman Feske
7318c5d7d4 Add const version of 'Path::base' accessor 2013-01-12 21:32:07 +01:00
Norman Feske
73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Norman Feske
0dbb5e1696 Propagate 'Range_allocator::alloc_aligned' errors
This patch reflects eventual allocation errors in a more specific way to
the caller of 'alloc_aligned', in particular out-of-metadata and
out-of-memory are considered as different conditions.

Related to issue #526.
2012-11-28 22:51:09 +01:00
Norman Feske
0bcf55800f Eagerly map DMA buffers
This patch is a work-around for issue #452.
2012-11-26 09:45:20 +01:00
Norman Feske
b62492837d Move 'Static_root' to public place
The 'Static_root' class template has proven to be useful for more than
one program. So we expose it as part of the API in the os repository.
2012-10-08 15:08:26 +02:00
Christian Prochaska
e9ac4b653b Add support for symbolic links
This patch adds support for symbolic links in libc, libc plugins, file
system servers and Noux.

Fixes #322.
2012-10-08 15:05:02 +02:00
Christian Prochaska
9dc213b296 'Genode::Path': Remove superfluous slashes first
Fixes #367.
2012-09-25 13:18:36 +02:00
Norman Feske
fab7b514e3 Move path utility from noux to 'os/include/os'
It turns out that the path-handling utility is valuable not only for
Noux. By moving it to a public header, we can use it for the libc.
2012-08-16 10:03:06 +02:00
Norman Feske
0ca47e8963 Support uncached 'Attached_ram_dataspace'
The enable the use of 'Attached_ram_dataspace' objects as DMA buffers,
we need to pass the 'cached' flag to the constructor. By default, the
dataspace is cached, which corresponds to the original behaviour.
2012-07-25 19:14:06 +02:00
Christian Prochaska
8a7fbe3973 Fix ring buffer interface description
The maximum number of elements in the ring buffer is QUEUE_SIZE - 1.

Fixes #240.
2012-06-20 10:17:50 +02:00
Norman Feske
f0fcf084d7 Improve robustness of policy matching
The 'Session_policy' helper could not cope well with configurations that
contain nodes of a type other than '<policy>'. This patch improves the
policy matching by skipping non-policy nodes.
2012-05-17 20:12:51 +02:00
Norman Feske
293b3c80d2 Fix exception type name in comment 2012-05-17 12:47:20 +02:00
Norman Feske
9a00ad7ae3 Support for dynamic ROM sessions, fix #170
This patch introduces support for ROM sessions that update their
provided data during the lifetime of the session. The 'Rom_session'
interface had been extended with the new 'release()' and 'sigh()'
functions, which are needed to support the new protocol. All ROM
services have been updated to the new interface.

Furthermore, the patch changes the child policy of init
with regard to the handling of configuration files. The 'Init::Child'
used to always provide the ROM dataspace with the child's config file
via a locally implemented ROM service. However, for dynamic ROM
sessions, we need to establish a session to the real supplier of the ROM
data. This is achieved by using a new 'Child_policy_redirect_rom_file'
policy to handle the 'configfile' rather than handling the 'configfile'
case entirely within 'Child_config'.

To see the new facility in action, the new 'os/run/dynamic_config.run'
script provides a simple scenario. The config file of the test program
is provided by a service, which generates and updates the config data
at regular intervals.

In addition, new support has been added to let slaves use dynamic
reconfiguration. By using the new 'Child_policy_dynamic_rom_file', the
configuration of a slave can be changed dynamically at runtime via the
new 'configure()' function.

The config is provided as plain null-terminated string (instead of a
dataspace capability) because we need to buffer the config data anyway.
So there is no benefit of using a dataspace. For buffering configuration
data, a 'Ram_session' must be supplied. If no 'Ram_session' is specified
at construction time of a 'Slave_policy', no config is supplied to the
slave (which is still a common case).

An example for dynamically reconfiguring a slave is provided by
'os/run/dynamic_config_slave.run'.
2012-04-05 11:25:26 +02:00
Norman Feske
ba248fe554 Add swap and realloc to 'Attached_ram_dataspace'
The new 'swap' and 'realloc' functions are needed in scenarios where
'Attached_ram_dataspace' is used to implement double buffering. The
particular use case is the implementation of dynamic ROM sessions.
2012-04-05 10:40:46 +02:00
Norman Feske
8495a5fc96 Convenience helper for attached ROM dataspaces
In the line of the 'Attached_ram_dataspace' and
'Attached_io_mem_dataspace' classes, this new helper simplifies the
access to ROM dataspaces.
2012-02-14 16:44:42 +01:00
Norman Feske
0058b15763 Helper for running a service as a child (slave)
The new 'Slave_policy' and 'Slave' classes are built upon the existing
child framework. They support the implementation of scenarios where a
service is started as a child of the client. This is usefull for
employing an existing service implementation as a local utility or
plugin.
2012-01-25 20:04:42 +01:00
Norman Feske
08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Genode Labs
da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00