Hello,
hereby, I'd like to give a heads-up about some changes that recently hit the genodelabs/master branch. Some of them impose minor API changes. Others might just be interesting to look at.
C++11 is now enabled by default.
The implementation of the convenience function for accessing the process configuration ('Genode::config()') was moved to a library named 'config'. This avoids a possible ambiguity when creating a singleton instance of the 'Config' object. Furthermore, the 'config()' semantics have slightly changed. Earlier versions reflected errors while obtaining the configuration to the application via exceptions ('Xml_node::Invalid_syntax', 'Rom_connection::Rom_connection_failed'). So each program had to handle those. The new version responds to such failures by printing a diagnostic message and handing out an empty '<config/>' node to the application.
There is a new utility for dispatching signals in the context of an RPC entrypoint (located at 'os/include/os/signal_rpc_dispatcher.h'). It allows an easy serialization of signal handlers and RPC functions at the server side.
To avoid code duplications across current server implementations, there is a new library called 'server', which performs the steps that are similar for typical servers. The interface is located at 'os/include/os/server.h'. The implementation can be found at 'os/src/lib/server/server.cc'. This library implements the 'main' function of the server and executes the actual server-specific initialization code in the context of the server's entrypoint ('construct()'). The 'construct' function gets a reference to an 'Entrypoint' as argument. In contrast to a normal 'Rpc_entrypoint' the new 'Entrypoint' can serve both signal handlers and RPC functions. This eliminates the need to manually synchronize signal handlers (that were typically be called from the context of the main thread) and RPC functions.
The nitpicker GUI server has been reworked to use the server library. Thereby the code has become much more robust. At the same time, nitpicker has become able to respond to configuration changes at runtime. If you like to have a look: 'os/src/server/nitpicker/main.cc'
The convenience functions at 'os/include/os/session_policy.h' to parse session policies were slightly changed. The old version of 'Session_policy' took a session-argument string as argument. However, merely the session label was actually used to select a policy. The new version introduces a new 'Session_label' type that extracts the session label from the session arguments. The new 'Session_policy' takes a 'Session_label' as argument.
Regards Norman