base: remove 'Native_thread' from public API

Issue #1832
This commit is contained in:
Norman Feske
2016-03-11 17:32:43 +01:00
committed by Christian Helmuth
parent dc0ebba1ec
commit da5d182ad3
77 changed files with 659 additions and 333 deletions

View File

@ -22,6 +22,9 @@
#include <base/native_types.h>
#include <base/thread.h>
/* base-internal includes */
#include <base/internal/native_thread.h>
/* Fiasco.OC includes */
namespace Fiasco {
#include <l4/sys/kdebug.h>
@ -48,7 +51,7 @@ static inline void thread_yield() { Fiasco::l4_thread_yield(); }
static inline bool thread_check_stopped_and_restart(Genode::Thread_base *thread_base)
{
Fiasco::l4_cap_idx_t tid = thread_base ?
thread_base->tid().kcap :
thread_base->native_thread().kcap :
Fiasco::MAIN_THREAD_CAP;
Fiasco::l4_cap_idx_t irq = tid + Fiasco::THREAD_IRQ_CAP;
Fiasco::l4_irq_trigger(irq);
@ -62,7 +65,7 @@ static inline bool thread_check_stopped_and_restart(Genode::Thread_base *thread_
static inline void thread_switch_to(Genode::Thread_base *thread_base)
{
Fiasco::l4_cap_idx_t tid = thread_base ?
thread_base->tid().kcap :
thread_base->native_thread().kcap :
Fiasco::MAIN_THREAD_CAP;
Fiasco::l4_thread_switch(tid);
}
@ -82,7 +85,7 @@ static void thread_stop_myself()
Genode::Thread_base *myself = Genode::Thread_base::myself();
Fiasco::l4_cap_idx_t tid = myself ?
myself->tid().kcap :
myself->native_thread().kcap :
Fiasco::MAIN_THREAD_CAP;
Fiasco::l4_cap_idx_t irq = tid + THREAD_IRQ_CAP;
l4_irq_receive(irq, L4_IPC_NEVER);

View File

@ -0,0 +1,14 @@
/*
* \brief Kernel-specific thread meta data
* \author Norman Feske
* \date 2016-03-11
*/
/*
* Copyright (C) 2016 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.
*/
#include <foc/native_thread.h>