xref: /haiku/src/add-ons/kernel/file_systems/xfs/Debug.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2  * Copyright 2017, Chế Vũ Gia Hy, cvghy116@gmail.com.
3  * Copyright 2011, Jérôme Duval, korli@users.berlios.de.
4  * Copyright 2008-2014, Axel Dörfler, axeld@pinc-software.de.
5  * Copyright 2005-2007, Ingo Weinhold, bonefish@cs.tu-berlin.de.
6  * Copyright 2020, Shubham Bhagat, shubhambhagat111@yahoo.com
7  * This file may be used under the terms of the MIT License.
8  */
9 #ifndef _DEBUG_H_
10 #define _DEBUG_H_
11 
12 #define TRACE_XFS
13 #ifdef TRACE_XFS
14 #define TRACE(x...) dprintf("\n\33[34mxfs:\33[0m " x)
15 #define ASSERT(x) \
16 	{ if (!(x)) kernel_debugger("xfs: assert failed: " #x "\n"); }
17 #else
18 #define TRACE(x...) ;
19 #define ASSERT(x) ;
20 #endif
21 #define ERROR(x...) dprintf("\n\33[34mxfs:\33[0m " x)
22 
23 #endif