mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-23 04:48:17 +00:00
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:
parent
0efd5a3078
commit
62d65d00e0
@ -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_ */
|
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/cap_alloc.h>
|
#include <base/internal/cap_alloc.h>
|
||||||
|
#include <base/internal/foc_assert.h>
|
||||||
|
|
||||||
/* Fiasco includes */
|
/* Fiasco includes */
|
||||||
namespace Fiasco {
|
namespace Fiasco {
|
||||||
@ -34,8 +35,6 @@ namespace Fiasco {
|
|||||||
#include <l4/sys/types.h>
|
#include <l4/sys/types.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <util/assert.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
/* Genode includes */
|
/* Genode includes */
|
||||||
#include <base/native_capability.h>
|
#include <base/native_capability.h>
|
||||||
#include <util/assert.h>
|
|
||||||
#include <util/construct_at.h>
|
#include <util/construct_at.h>
|
||||||
#include <foc/native_capability.h>
|
#include <foc/native_capability.h>
|
||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/cap_map.h>
|
#include <base/internal/cap_map.h>
|
||||||
|
#include <base/internal/foc_assert.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
|
||||||
|
32
repos/base-foc/src/include/base/internal/foc_assert.h
Normal file
32
repos/base-foc/src/include/base/internal/foc_assert.h
Normal 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_ */
|
@ -13,13 +13,10 @@
|
|||||||
* under the terms of the GNU General Public License version 2.
|
* under the terms of the GNU General Public License version 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Genode includes */
|
|
||||||
#include <util/assert.h>
|
|
||||||
#include <base/log.h>
|
|
||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/spin_lock.h>
|
#include <base/internal/spin_lock.h>
|
||||||
#include <base/internal/cap_map.h>
|
#include <base/internal/cap_map.h>
|
||||||
|
#include <base/internal/foc_assert.h>
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include <foc/capability_space.h>
|
#include <foc/capability_space.h>
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
#include <base/ipc.h>
|
#include <base/ipc.h>
|
||||||
#include <base/ipc_msgbuf.h>
|
#include <base/ipc_msgbuf.h>
|
||||||
#include <base/thread.h>
|
#include <base/thread.h>
|
||||||
#include <util/assert.h>
|
|
||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/lock_helper.h> /* for 'thread_get_my_native_id()' */
|
#include <base/internal/lock_helper.h> /* for 'thread_get_my_native_id()' */
|
||||||
#include <base/internal/ipc_server.h>
|
#include <base/internal/ipc_server.h>
|
||||||
#include <base/internal/native_utcb.h>
|
#include <base/internal/native_utcb.h>
|
||||||
#include <base/internal/cap_map.h>
|
#include <base/internal/cap_map.h>
|
||||||
|
#include <base/internal/foc_assert.h>
|
||||||
|
|
||||||
/* Fiasco.OC includes */
|
/* Fiasco.OC includes */
|
||||||
namespace Fiasco {
|
namespace Fiasco {
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <base/exception.h>
|
#include <base/exception.h>
|
||||||
#include <thread/capability.h>
|
#include <thread/capability.h>
|
||||||
#include <session/session.h>
|
#include <session/session.h>
|
||||||
#include <signal_source/signal_source.h>
|
|
||||||
#include <region_map/region_map.h>
|
#include <region_map/region_map.h>
|
||||||
|
|
||||||
namespace Genode {
|
namespace Genode {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <base/rpc_client.h>
|
#include <base/rpc_client.h>
|
||||||
#include <pd_session/pd_session.h>
|
#include <pd_session/pd_session.h>
|
||||||
|
#include <signal_source/signal_source.h>
|
||||||
|
|
||||||
namespace Genode { class Signal_source_client; }
|
namespace Genode { class Signal_source_client; }
|
||||||
|
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/ipc_server.h>
|
#include <base/internal/ipc_server.h>
|
||||||
|
#include <signal_source/signal_source.h>
|
||||||
|
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
#include <base/thread.h>
|
#include <base/thread.h>
|
||||||
#include <base/sleep.h>
|
#include <base/sleep.h>
|
||||||
#include <base/trace/events.h>
|
#include <base/trace/events.h>
|
||||||
#include <signal_source/client.h>
|
|
||||||
#include <util/volatile_object.h>
|
#include <util/volatile_object.h>
|
||||||
|
|
||||||
/* base-internal includes */
|
/* base-internal includes */
|
||||||
#include <base/internal/globals.h>
|
#include <base/internal/globals.h>
|
||||||
|
#include <signal_source/client.h>
|
||||||
|
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <base/allocator_avl.h>
|
#include <base/allocator_avl.h>
|
||||||
#include <block_session/connection.h>
|
#include <block_session/connection.h>
|
||||||
#include <os/config.h>
|
#include <os/config.h>
|
||||||
#include <util/assert.h>
|
|
||||||
#include <foc/capability_space.h>
|
#include <foc/capability_space.h>
|
||||||
|
|
||||||
#include <vcpu.h>
|
#include <vcpu.h>
|
||||||
@ -25,6 +24,7 @@
|
|||||||
namespace Fiasco {
|
namespace Fiasco {
|
||||||
#include <genode/block.h>
|
#include <genode/block.h>
|
||||||
#include <l4/sys/irq.h>
|
#include <l4/sys/irq.h>
|
||||||
|
#include <l4/sys/kdebug.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -63,7 +63,10 @@ namespace {
|
|||||||
void insert(void *packet, void *request)
|
void insert(void *packet, void *request)
|
||||||
{
|
{
|
||||||
int idx = _find(0);
|
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);
|
_cache[idx] = Req_entry(packet, request);
|
||||||
}
|
}
|
||||||
@ -71,7 +74,10 @@ namespace {
|
|||||||
void remove(void *packet, void **request)
|
void remove(void *packet, void **request)
|
||||||
{
|
{
|
||||||
int idx = _find(packet);
|
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;
|
*request = _cache[idx].req;
|
||||||
_cache[idx].pkt = 0;
|
_cache[idx].pkt = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user