mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-04 22:47:00 +00:00
V1: In order to remove MISRA C violations for rule 219S, rename functions, macros whose name starts with "_". Also removed some __mmio functions because they are duplicates and are not used anywhere. Renamed functions like __assert, to asm_assert, because they were only wrappers around asm calls. V2: Over and above the changes on V1, modified bitmap functions names to lock (corresponding to unlock) introduced in V1 Signed-off-by: Arindam Roy <arindam.roy@intel.com>
22 lines
399 B
C
22 lines
399 B
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef ASSERT_H
|
|
#define ASSERT_H
|
|
|
|
#ifdef HV_DEBUG
|
|
void asm_assert(int32_t line, const char *file, const char *txt);
|
|
|
|
#define ASSERT(x, ...) \
|
|
if (!(x)) {\
|
|
asm_assert(__LINE__, __FILE__, "fatal error");\
|
|
}
|
|
#else
|
|
#define ASSERT(x, ...) do { } while(0)
|
|
#endif
|
|
|
|
#endif /* ASSERT_H */
|