genode/repos/base/src/core/pd_session_component.cc
Norman Feske e20bbe7002 base: remove integer return codes from PD-session
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
2016-05-09 13:09:56 +02:00

50 lines
1000 B
C++

/*
* \brief Core implementation of the PD session interface
* \author Christian Helmuth
* \date 2006-07-17
*
* FIXME arg_string and quota missing
*/
/*
* 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 */
#include <base/printf.h>
/* Core */
#include <util.h>
#include <pd_session_component.h>
#include <cpu_session_component.h>
using namespace Genode;
void Pd_session_component::bind_thread(Thread_capability thread)
{
return _thread_ep.apply(thread, [&] (Cpu_thread_component *cpu_thread) {
if (!cpu_thread) return;
if (cpu_thread->bound()) {
PWRN("rebinding of threads not supported");
return;
}
Platform_thread *p_thread = cpu_thread->platform_thread();
_pd.bind_thread(p_thread);
cpu_thread->bound(true);
});
}
void Pd_session_component::assign_parent(Parent_capability parent)
{
_pd.assign_parent(parent);
}