2016-09-28 09:56:06 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
2016-11-18 15:44:25 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2016-09-28 09:56:06 +02:00
|
|
|
#include "assert.h"
|
|
|
|
|
|
|
|
#ifdef DEBUG_ASSERT_VERBOSE
|
|
|
|
NORETURN void _assert_failure(const char *file, unsigned line)
|
|
|
|
{
|
2017-02-16 17:10:57 +01:00
|
|
|
printf("%s:%u => ", file, line); \
|
2016-09-28 09:56:06 +02:00
|
|
|
core_panic(PANIC_ASSERT_FAIL, assert_crash_message); \
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
typedef int dont_be_pedantic;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** @} */
|