mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 06:57:51 +00:00
ca971bbfd8
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082
38 lines
898 B
C++
38 lines
898 B
C++
/*
|
|
* \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_ */
|