mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-13 04:38:20 +00:00
Don't memcpy the parent capability. Fix #144.
To give the platform developer more freedom in how the Native_capability class is internally implemented (e.g. turning it into a smart-pointer), this patch removes the memcpy operation, when transfering the parent-capability to a new process from the generic code, and let the implementation of the platform-specific Native_capability decide how the transfer has to be done. Please refer to issue #144.
This commit is contained in:
committed by
Norman Feske
parent
fa377f0df5
commit
9992efed03
@ -14,6 +14,8 @@
|
||||
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
|
||||
#define _INCLUDE__BASE__NATIVE_TYPES_H_
|
||||
|
||||
#include <util/string.h>
|
||||
|
||||
/*
|
||||
* We cannot just include <semaphore.h> and <pthread.h> here
|
||||
* because this would impy the nested inclusion of a myriad
|
||||
@ -145,6 +147,12 @@ namespace Genode {
|
||||
*/
|
||||
long dst() const { return _tid; }
|
||||
long tid() const { return _tid; }
|
||||
|
||||
/**
|
||||
* Copy this capability to another pd.
|
||||
*/
|
||||
void copy_to(void* dst) {
|
||||
memcpy(dst, this, sizeof(Native_capability)); }
|
||||
};
|
||||
|
||||
typedef int Native_connection_state; /* socket descriptor */
|
||||
|
Reference in New Issue
Block a user