Remove signal-source headers from public API

Those headers implement a platform-specific mechanism. They are never
used by components directly.

This patch also cleans up a few other remaining platform-specific
artifact such as the Fiasco.OC-specific assert.h.

Issue #1993
This commit is contained in:
Norman Feske 2016-07-12 16:33:18 +02:00
parent 0efd5a3078
commit 62d65d00e0
19 changed files with 48 additions and 50 deletions

View File

@ -1,37 +0,0 @@
/*
* \brief Assertion macros for Fiasco.OC
* \author Stefan Kalkowski
* \date 2012-05-25
*/
/*
* 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.
*/
#ifndef _INCLUDE__UTIL__ASSERT_H_
#define _INCLUDE__UTIL__ASSERT_H_
#include <base/printf.h>
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
#if 1
#define ASSERT(e, s) \
do { if (!(e)) { \
Fiasco::outstring(ESC_ERR s ESC_END "\n"); \
Fiasco::outstring(__FILE__ ":"); \
Fiasco::outdec(__LINE__); \
Fiasco::outstring("\n"); \
enter_kdebug("ASSERT"); \
} \
} while(0)
#else
#define ASSERT(e, s) do { } while (0)
#endif
#endif /* _INCLUDE__UTIL__ASSERT_H_ */

View File

@ -24,6 +24,7 @@
/* base-internal includes */
#include <base/internal/cap_alloc.h>
#include <base/internal/foc_assert.h>
/* Fiasco includes */
namespace Fiasco {
@ -34,8 +35,6 @@ namespace Fiasco {
#include <l4/sys/types.h>
}
#include <util/assert.h>
using namespace Genode;

View File

@ -16,12 +16,12 @@
/* Genode includes */
#include <base/native_capability.h>
#include <util/assert.h>
#include <util/construct_at.h>
#include <foc/native_capability.h>
/* base-internal includes */
#include <base/internal/cap_map.h>
#include <base/internal/foc_assert.h>
namespace Genode {

View File

@ -0,0 +1,32 @@
/*
* \brief Assertion macros for Fiasco.OC
* \author Stefan Kalkowski
* \date 2012-05-25
*/
/*
* 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.
*/
#ifndef _INCLUDE__BASE__INTERNAL__FOC_ASSERT_H_
#define _INCLUDE__BASE__INTERNAL__FOC_ASSERT_H_
/* Genode includes */
#include <base/log.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
#define ASSERT(e, s) \
do { if (!(e)) { \
Genode::raw("assertion failed: ", s, __FILE__, __LINE__); \
enter_kdebug("ASSERT"); \
} \
} while(0)
#endif /* _INCLUDE__BASE__INTERNAL__FOC_ASSERT_H_ */

View File

@ -13,13 +13,10 @@
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <util/assert.h>
#include <base/log.h>
/* base-internal includes */
#include <base/internal/spin_lock.h>
#include <base/internal/cap_map.h>
#include <base/internal/foc_assert.h>
/* kernel includes */
#include <foc/capability_space.h>

View File

@ -26,13 +26,13 @@
#include <base/ipc.h>
#include <base/ipc_msgbuf.h>
#include <base/thread.h>
#include <util/assert.h>
/* base-internal includes */
#include <base/internal/lock_helper.h> /* for 'thread_get_my_native_id()' */
#include <base/internal/ipc_server.h>
#include <base/internal/native_utcb.h>
#include <base/internal/cap_map.h>
#include <base/internal/foc_assert.h>
/* Fiasco.OC includes */
namespace Fiasco {

View File

@ -20,7 +20,6 @@
#include <base/exception.h>
#include <thread/capability.h>
#include <session/session.h>
#include <signal_source/signal_source.h>
#include <region_map/region_map.h>
namespace Genode {

View File

@ -16,6 +16,7 @@
#include <base/rpc_client.h>
#include <pd_session/pd_session.h>
#include <signal_source/signal_source.h>
namespace Genode { class Signal_source_client; }

View File

@ -19,6 +19,7 @@
/* base-internal includes */
#include <base/internal/ipc_server.h>
#include <signal_source/signal_source.h>
using namespace Genode;

View File

@ -18,11 +18,11 @@
#include <base/thread.h>
#include <base/sleep.h>
#include <base/trace/events.h>
#include <signal_source/client.h>
#include <util/volatile_object.h>
/* base-internal includes */
#include <base/internal/globals.h>
#include <signal_source/client.h>
using namespace Genode;

View File

@ -16,7 +16,6 @@
#include <base/allocator_avl.h>
#include <block_session/connection.h>
#include <os/config.h>
#include <util/assert.h>
#include <foc/capability_space.h>
#include <vcpu.h>
@ -25,6 +24,7 @@
namespace Fiasco {
#include <genode/block.h>
#include <l4/sys/irq.h>
#include <l4/sys/kdebug.h>
}
namespace {
@ -63,7 +63,10 @@ namespace {
void insert(void *packet, void *request)
{
int idx = _find(0);
ASSERT(idx >= 0, "Req cache full!");
if (idx == 0) {
PERR("Req cache full!");
enter_kdebug("Req_cache");
}
_cache[idx] = Req_entry(packet, request);
}
@ -71,7 +74,10 @@ namespace {
void remove(void *packet, void **request)
{
int idx = _find(packet);
ASSERT(idx >= 0, "Req cache entry not found!");
if (idx == 0) {
PERR("Req cache entry not found!");
enter_kdebug("Req_cache");
}
*request = _cache[idx].req;
_cache[idx].pkt = 0;