/* * \brief Native types on OKL4 * \author Norman Feske * \date 2008-07-26 */ /* * Copyright (C) 2008-2013 Genode Labs GmbH * * 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_TYPES_H_ #define _INCLUDE__BASE__NATIVE_TYPES_H_ #include #include namespace Okl4 { extern "C" { #include } } namespace Genode { class Platform_thread; /** * Index of the UTCB's thread word used for storing the own global * thread ID */ enum { UTCB_TCR_THREAD_WORD_MYSELF = 0 }; struct Native_thread { Okl4::L4_ThreadId_t l4id; /** * Only used in core * * For 'Thread' objects created within core, 'pt' points to * the physical thread object, which is going to be destroyed * on destruction of the 'Thread'. */ Platform_thread *pt; }; struct Cap_dst_policy { typedef Okl4::L4_ThreadId_t Dst; static bool valid(Dst tid) { return !Okl4::L4_IsNilThread(tid); } static Dst invalid() { return Okl4::L4_nilthread; } static void copy(void* dst, Native_capability_tpl* src); }; typedef Native_capability_tpl Native_capability; typedef Okl4::L4_ThreadId_t Native_connection_state; } #endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */