e20bbe7002
The return code of assign_parent remained unused. So this patch removes it. The bind_thread function fails only due to platform-specific limitations such as the exhaustion of ID name spaces, which cannot be sensibly handled by the PD-session client. If occurred, such conditions used to be reflected by integer return codes that were used for diagnostic messages only. The patch removes the return codes and leaves the diagnostic output to core. Fixes #1842
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
/*
|
|
* \brief Implementation of Thread API interface on top of Platform_thread
|
|
* \author Norman Feske
|
|
* \date 2006-05-03
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2006-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.
|
|
*/
|
|
|
|
/* Genode includes */
|
|
#include <base/thread.h>
|
|
#include <base/sleep.h>
|
|
|
|
/* base-internal includes */
|
|
#include <base/internal/stack.h>
|
|
|
|
/* core includes */
|
|
#include <platform.h>
|
|
#include <core_env.h>
|
|
|
|
using namespace Genode;
|
|
|
|
|
|
void Thread_base::_thread_start()
|
|
{
|
|
Thread_base::myself()->_thread_bootstrap();
|
|
Thread_base::myself()->entry();
|
|
Thread_base::myself()->_join_lock.unlock();
|
|
sleep_forever();
|
|
}
|
|
|
|
|
|
void Thread_base::start()
|
|
{
|
|
/* create and start platform thread */
|
|
native_thread().pt = new(platform_specific()->thread_slab())
|
|
Platform_thread(0, _stack->name().string());
|
|
|
|
platform_specific()->core_pd()->bind_thread(native_thread().pt);
|
|
|
|
native_thread().pt->start((void *)_thread_start, stack_top());
|
|
}
|
|
|
|
|
|
void Thread_base::cancel_blocking()
|
|
{
|
|
/*
|
|
* Within core, we never need to unblock threads
|
|
*/
|
|
}
|
|
|
|
|
|
void Thread_base::_deinit_platform_thread()
|
|
{
|
|
/* destruct platform thread */
|
|
destroy(platform_specific()->thread_slab(), native_thread().pt);
|
|
}
|