2011-12-22 16:19:25 +01:00
|
|
|
/*
|
2016-06-13 13:53:58 +02:00
|
|
|
* \brief Native capability type on L4/Fiasco
|
2011-12-22 16:19:25 +01:00
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2008-07-26
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 21:44:47 +01:00
|
|
|
* Copyright (C) 2008-2013 Genode Labs GmbH
|
2011-12-22 16:19:25 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
2016-06-13 13:53:58 +02:00
|
|
|
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
|
|
|
|
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
|
2011-12-22 16:19:25 +01:00
|
|
|
|
2016-03-03 17:57:29 +01:00
|
|
|
/* Genode includes */
|
2016-06-13 13:53:58 +02:00
|
|
|
#include <base/native_capability_tpl.h>
|
2012-08-29 14:42:56 +02:00
|
|
|
#include <base/stdint.h>
|
2012-03-07 11:58:40 +01:00
|
|
|
|
2011-12-22 16:19:25 +01:00
|
|
|
namespace Fiasco {
|
|
|
|
#include <l4/sys/types.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Genode {
|
|
|
|
|
2012-03-09 11:39:46 +01:00
|
|
|
struct Cap_dst_policy
|
|
|
|
{
|
|
|
|
typedef Fiasco::l4_threadid_t Dst;
|
|
|
|
static bool valid(Dst id) { return !Fiasco::l4_is_invalid_id(id); }
|
|
|
|
static Dst invalid()
|
|
|
|
{
|
|
|
|
using namespace Fiasco;
|
|
|
|
return L4_INVALID_ID;
|
|
|
|
}
|
|
|
|
static void copy(void* dst, Native_capability_tpl<Cap_dst_policy>* src);
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
|
2011-12-22 16:19:25 +01:00
|
|
|
}
|
|
|
|
|
2016-06-13 13:53:58 +02:00
|
|
|
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */
|