2015-04-28 17:42:07 +02:00
|
|
|
/*
|
|
|
|
* \brief Implementation of the Thread API (foc-specific myself())
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2015-04-28
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
2015-04-28 17:42:07 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2015-04-28 17:42:07 +02:00
|
|
|
*/
|
|
|
|
|
2016-06-13 13:53:58 +02:00
|
|
|
/* Genode includes */
|
2015-04-28 17:42:07 +02:00
|
|
|
#include <base/thread.h>
|
|
|
|
|
2016-06-13 13:53:58 +02:00
|
|
|
/* base-internal includes */
|
|
|
|
#include <base/internal/native_utcb.h>
|
|
|
|
|
2015-04-28 17:42:07 +02:00
|
|
|
|
2016-05-04 12:27:17 +02:00
|
|
|
Genode::Thread *Genode::Thread::myself()
|
2015-04-28 17:42:07 +02:00
|
|
|
{
|
|
|
|
using namespace Fiasco;
|
|
|
|
|
2016-05-04 12:27:17 +02:00
|
|
|
return reinterpret_cast<Thread*>(l4_utcb_tcr()->user[UTCB_TCR_THREAD_OBJ]);
|
2015-04-28 17:42:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|