113496ba1Ssnj/*
213496ba1Ssnj * Copyright (c) 2014 Intel Corporation
313496ba1Ssnj *
413496ba1Ssnj * Permission is hereby granted, free of charge, to any person obtaining a
513496ba1Ssnj * copy of this software and associated documentation files (the "Software"),
613496ba1Ssnj * to deal in the Software without restriction, including without limitation
713496ba1Ssnj * the rights to use, copy, modify, merge, publish, distribute, sublicense,
813496ba1Ssnj * and/or sell copies of the Software, and to permit persons to whom the
913496ba1Ssnj * Software is furnished to do so, subject to the following conditions:
1013496ba1Ssnj *
1113496ba1Ssnj * The above copyright notice and this permission notice (including the next
1213496ba1Ssnj * paragraph) shall be included in all copies or substantial portions of the
1313496ba1Ssnj * Software.
1413496ba1Ssnj *
1513496ba1Ssnj * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1613496ba1Ssnj * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1713496ba1Ssnj * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1813496ba1Ssnj * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1913496ba1Ssnj * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2013496ba1Ssnj * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2113496ba1Ssnj * SOFTWARE.
2213496ba1Ssnj *
2313496ba1Ssnj * Authors:
2413496ba1Ssnj *    Chris Wilson <chris@chris-wilson.co.uk>
2513496ba1Ssnj *
2613496ba1Ssnj */
2713496ba1Ssnj
2813496ba1Ssnj#ifndef _SNA_DEBUG_H_
2913496ba1Ssnj#define _SNA_DEBUG_H_
3013496ba1Ssnj
3113496ba1Ssnj#if HAS_DEBUG_FULL
3213496ba1Ssnjvoid LogF(const char *f, ...);
3313496ba1Ssnj#define DBG(x) LogF x
3413496ba1Ssnj#else
35fe8aea9eSmrg#define DBG(x) do {} while (0)
3613496ba1Ssnj#endif
3713496ba1Ssnj
3813496ba1Ssnj#if HAS_DEBUG_FULL || !defined(NDEBUG)
3913496ba1Ssnj#define ERR(x) ErrorF x
4013496ba1Ssnj#else
41fe8aea9eSmrg#define ERR(x) do {} while (0)
4213496ba1Ssnj#endif
4313496ba1Ssnj
4413496ba1Ssnj#endif /* _SNA_DEBUG_H_ */
45