mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-22 04:52:56 +01:00
Replace 'Native_capability::copy_to' by accessor
The 'copy_to' function turned out to be not flexible enough to accommodate the Noux fork mechanism. This patch removes the function, adds an accessor for the capability destination and a compound type 'Native_capability::Raw' to be used wherever plain capability information must be communicated.
This commit is contained in:
8
base/src/base/env/reload_parent_cap.cc
vendored
8
base/src/base/env/reload_parent_cap.cc
vendored
@@ -15,7 +15,8 @@
|
||||
#include <base/crt0.h>
|
||||
|
||||
|
||||
void Genode::Platform_env::reload_parent_cap(Capability<Parent> parent_cap)
|
||||
void Genode::Platform_env::reload_parent_cap(Native_capability::Dst dst,
|
||||
long local_name)
|
||||
{
|
||||
/*
|
||||
* This function is unused during the normal operation of Genode. It is
|
||||
@@ -35,7 +36,10 @@ void Genode::Platform_env::reload_parent_cap(Capability<Parent> parent_cap)
|
||||
* Patch new parent capability into the original location as specified by
|
||||
* the linker script.
|
||||
*/
|
||||
*(Capability<Parent> *)(&_parent_cap) = parent_cap;
|
||||
Native_capability::Raw *raw = (Native_capability::Raw *)(&_parent_cap);
|
||||
|
||||
raw->dst = dst;
|
||||
raw->local_name = local_name;
|
||||
|
||||
/*
|
||||
* Re-initialize 'Platform_env' members
|
||||
|
||||
@@ -122,7 +122,11 @@ static addr_t _setup_elf(Parent_capability parent_cap,
|
||||
* data segment
|
||||
*/
|
||||
if (!parent_info) {
|
||||
parent_cap.copy_to(ptr);
|
||||
Native_capability::Raw *raw = (Native_capability::Raw *)ptr;
|
||||
|
||||
raw->dst = parent_cap.dst();
|
||||
raw->local_name = parent_cap.local_name();
|
||||
|
||||
parent_info = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user