mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 02:28:54 +00:00
base: refactor signal_transmitter::submit
Move it to platform specific .cc file, so that it may get re-implemented platform specifically if needed. Issue #1446
This commit is contained in:
parent
dac3efcc02
commit
1f8fad8fa1
@ -18,7 +18,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
|
||||
SRC_CC += thread/context_allocator.cc env/utcb.cc
|
||||
|
@ -18,7 +18,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
|
||||
SRC_CC += thread/context_allocator.cc
|
||||
|
@ -18,7 +18,7 @@ SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += env/spin_lock.cc env/cap_map.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
|
||||
SRC_CC += thread/context_allocator.cc
|
||||
|
@ -18,7 +18,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap_empty.cc
|
||||
|
||||
|
@ -21,8 +21,7 @@ SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += console/console.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc
|
||||
SRC_CC += signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc
|
||||
SRC_CC += server/common.cc
|
||||
SRC_CC += thread/bootstrap.cc
|
||||
|
32
repos/base-hw/src/base/signal/platform.cc
Normal file
32
repos/base-hw/src/base/signal/platform.cc
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* \brief Implementations of the signaling framework specific for HW-core
|
||||
* \author Martin Stein
|
||||
* \date 2012-05-05
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012-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 <signal_session/connection.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <kernel/interface.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
/************************
|
||||
** Signal transmitter **
|
||||
************************/
|
||||
void Signal_transmitter::submit(unsigned cnt)
|
||||
{
|
||||
{
|
||||
Trace::Signal_submit trace_event(cnt);
|
||||
}
|
||||
Kernel::submit_signal(_context.dst(), cnt);
|
||||
}
|
@ -79,10 +79,7 @@ void Signal_context::submit(unsigned num)
|
||||
** Signal transmitter **
|
||||
************************/
|
||||
|
||||
void Signal_transmitter::submit(unsigned const cnt)
|
||||
{
|
||||
Kernel::submit_signal(_context.dst(), cnt);
|
||||
}
|
||||
Signal_connection * Signal_transmitter::connection() { return signal_connection(); }
|
||||
|
||||
|
||||
/*********************
|
||||
|
@ -17,7 +17,7 @@ SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += env/rm_session_mmap.cc env/debug.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/trace.cc thread/thread_env.cc thread/context_allocator.cc
|
||||
|
||||
|
@ -16,7 +16,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_context.cc thread/trace.cc
|
||||
SRC_CC += thread/context_allocator.cc env/cap_map.cc
|
||||
|
@ -18,7 +18,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
|
||||
SRC_CC += thread/context_allocator.cc
|
||||
|
@ -18,7 +18,7 @@ SRC_CC += child/child.cc
|
||||
SRC_CC += process/process.cc
|
||||
SRC_CC += elf/elf_binary.cc
|
||||
SRC_CC += lock/lock.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc
|
||||
SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc
|
||||
SRC_CC += server/server.cc server/common.cc
|
||||
SRC_CC += thread/thread.cc thread/trace.cc thread/thread_bootstrap.cc
|
||||
SRC_CC += thread/context_allocator.cc
|
||||
|
@ -34,6 +34,7 @@ namespace Genode {
|
||||
class Signal_transmitter;
|
||||
class Signal;
|
||||
class Signal_dispatcher_base;
|
||||
class Signal_connection;
|
||||
template <typename> class Signal_dispatcher;
|
||||
}
|
||||
|
||||
@ -122,6 +123,8 @@ class Genode::Signal_transmitter
|
||||
|
||||
Signal_context_capability _context; /* destination */
|
||||
|
||||
Signal_connection * connection();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
|
29
repos/base/src/base/signal/platform.cc
Normal file
29
repos/base/src/base/signal/platform.cc
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* \brief Generic implementation parts of the signaling framework which are
|
||||
* implemented platform specifically, e.g. base-hw and base-nova.
|
||||
* \author Norman Feske
|
||||
* \author Alexander Boettcher
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-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.
|
||||
*/
|
||||
|
||||
|
||||
#include <signal_session/connection.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
/************************
|
||||
** Signal transmitter **
|
||||
************************/
|
||||
void Signal_transmitter::submit(unsigned cnt)
|
||||
{
|
||||
{
|
||||
Trace::Signal_submit trace_event(cnt);
|
||||
}
|
||||
connection()->submit(_context, cnt);
|
||||
}
|
@ -228,14 +228,7 @@ void Signal_context::submit(unsigned num)
|
||||
** Signal transmitter **
|
||||
************************/
|
||||
|
||||
void Signal_transmitter::submit(unsigned cnt)
|
||||
{
|
||||
{
|
||||
Trace::Signal_submit trace_event(cnt);
|
||||
}
|
||||
signal_connection()->submit(_context, cnt);
|
||||
}
|
||||
|
||||
Signal_connection * Signal_transmitter::connection() { return signal_connection(); }
|
||||
|
||||
/*********************
|
||||
** Signal receiver **
|
||||
|
Loading…
Reference in New Issue
Block a user