1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (C) 2017 Intel Corporation. 3 * All rights reserved. 4 */ 5 6 #ifndef SPDK_INTERNAL_ASSERT_H 7 #define SPDK_INTERNAL_ASSERT_H 8 9 #include "spdk/stdinc.h" 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #include "spdk/assert.h" 16 17 #if !defined(DEBUG) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 18 #define SPDK_UNREACHABLE() __builtin_unreachable() 19 #else 20 #define SPDK_UNREACHABLE() abort() 21 #endif 22 23 #ifdef __cplusplus 24 } 25 #endif 26 27 #endif /* SPDK_INTERNAL_ASSERT_H */ 28