genode/repos/base-fiasco/include/base/native_capability.h

43 lines
952 B
C
Raw Normal View History

2011-12-22 16:19:25 +01: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.
*/
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
2011-12-22 16:19:25 +01:00
/* Genode includes */
#include <base/native_capability_tpl.h>
#include <base/stdint.h>
2011-12-22 16:19:25 +01:00
namespace Fiasco {
#include <l4/sys/types.h>
}
namespace Genode {
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
}
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */