2015-05-11 17:54:11 +02:00
|
|
|
/*
|
|
|
|
* \brief Implementation of Thread API interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2015-05-01
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <base/thread.h>
|
2016-07-18 11:04:42 +02:00
|
|
|
#include <base/internal/native_thread.h>
|
2016-07-20 12:02:23 +02:00
|
|
|
#include <base/internal/capability_space_sel4.h>
|
2015-05-11 17:54:11 +02:00
|
|
|
|
|
|
|
using namespace Genode;
|
|
|
|
|
|
|
|
|
2016-05-04 12:27:17 +02:00
|
|
|
void Thread::_init_platform_thread(size_t, Type type)
|
2015-05-11 17:54:11 +02:00
|
|
|
{
|
2016-07-18 11:04:42 +02:00
|
|
|
/**
|
|
|
|
* Reset to default values. The default values trigger initial allocations
|
|
|
|
* and associations the thread, like IPCbuffer in ipc.cc.
|
|
|
|
*/
|
|
|
|
native_thread() = Native_thread();
|
2016-07-20 12:02:23 +02:00
|
|
|
|
|
|
|
if (type == MAIN) {
|
|
|
|
native_thread().lock_sel = INITIAL_SEL_LOCK;
|
|
|
|
return;
|
|
|
|
}
|
2015-05-11 17:54:11 +02:00
|
|
|
}
|