mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-12 05:41:36 +00:00
Resolve ambiguity of size_t
This patch replaces the first attempt to resolve the ambiguity of using the size_t type that occurred when 'loader_session.h' was included alongside libc headers. Instead of explicitly qualifying each occurrence of the type, the new solution defines 'size_t' within the 'Loader' namespace. Fixes #253
This commit is contained in:
parent
ed58040794
commit
12f2572155
@ -26,13 +26,13 @@ namespace Loader {
|
||||
explicit Session_client(Loader::Session_capability session)
|
||||
: Rpc_client<Session>(session) { }
|
||||
|
||||
Dataspace_capability alloc_rom_module(Name const &name, Genode::size_t size) {
|
||||
Dataspace_capability alloc_rom_module(Name const &name, size_t size) {
|
||||
return call<Rpc_alloc_rom_module>(name, size); }
|
||||
|
||||
void commit_rom_module(Name const &name) {
|
||||
call<Rpc_commit_rom_module>(name); }
|
||||
|
||||
void ram_quota(Genode::size_t quantum) {
|
||||
void ram_quota(size_t quantum) {
|
||||
call<Rpc_ram_quota>(quantum); }
|
||||
|
||||
void constrain_geometry(int width, int height) {
|
||||
|
@ -22,7 +22,7 @@ namespace Loader {
|
||||
|
||||
struct Connection : Genode::Connection<Session>, Session_client
|
||||
{
|
||||
Connection(Genode::size_t ram_quota)
|
||||
Connection(size_t ram_quota)
|
||||
:
|
||||
Genode::Connection<Session>(session("ram_quota=%zd", ram_quota)),
|
||||
Session_client(cap())
|
||||
|
@ -28,6 +28,12 @@ namespace Loader {
|
||||
|
||||
struct Session : Genode::Session
|
||||
{
|
||||
/*
|
||||
* Resolve ambiguity of 'size_t' type when using 'loader_session.h'
|
||||
* together with libc headers.
|
||||
*/
|
||||
typedef Genode::size_t size_t;
|
||||
|
||||
/*
|
||||
* Exception types
|
||||
*/
|
||||
@ -69,8 +75,7 @@ namespace Loader {
|
||||
* becomes visible. The server frees intermediate dataspaces that are
|
||||
* no longer used.
|
||||
*/
|
||||
virtual Dataspace_capability alloc_rom_module(Name const &name,
|
||||
Genode::size_t size) = 0;
|
||||
virtual Dataspace_capability alloc_rom_module(Name const &name, size_t size) = 0;
|
||||
|
||||
/**
|
||||
* Expose ROM module to loaded subsystem
|
||||
@ -92,7 +97,7 @@ namespace Loader {
|
||||
* If 'ram_quota' is not called prior calling 'start', all available
|
||||
* session resources will be assigned to the subsystem.
|
||||
*/
|
||||
virtual void ram_quota(Genode::size_t quantum) = 0;
|
||||
virtual void ram_quota(size_t quantum) = 0;
|
||||
|
||||
/**
|
||||
* Constrain size of the nitpicker buffer used by the subsystem
|
||||
@ -135,11 +140,11 @@ namespace Loader {
|
||||
*******************/
|
||||
|
||||
GENODE_RPC(Rpc_alloc_rom_module, Dataspace_capability, alloc_rom_module,
|
||||
Name const &, Genode::size_t);
|
||||
Name const &, size_t);
|
||||
GENODE_RPC_THROW(Rpc_commit_rom_module, void, commit_rom_module,
|
||||
GENODE_TYPE_LIST(Rom_module_does_not_exist),
|
||||
Name const &);
|
||||
GENODE_RPC(Rpc_ram_quota, void, ram_quota, Genode::size_t);
|
||||
GENODE_RPC(Rpc_ram_quota, void, ram_quota, size_t);
|
||||
GENODE_RPC(Rpc_constrain_geometry, void, constrain_geometry, int, int);
|
||||
GENODE_RPC(Rpc_view_ready_sigh, void, view_ready_sigh, Signal_context_capability);
|
||||
GENODE_RPC_THROW(Rpc_start, void, start,
|
||||
|
Loading…
x
Reference in New Issue
Block a user