GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / tidspbridge / include / dspbridge / dbc.h
blob463760f499a41a2e0c43dce63314612cbc1849c9
1 /*
2 * dbc.h
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * "Design by Contract" programming macros.
8 * Notes:
9 * Requires that the GT->ERROR function has been defaulted to a valid
10 * error handler for the given execution environment.
12 * Does not require that GT_init() be called.
14 * Copyright (C) 2008 Texas Instruments, Inc.
16 * This package is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
20 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
22 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25 #ifndef DBC_
26 #define DBC_
28 /* Assertion Macros: */
29 #ifdef CONFIG_TIDSPBRIDGE_DEBUG
31 #define DBC_ASSERT(exp) \
32 if (!(exp)) \
33 pr_err("%s, line %d: Assertion (" #exp ") failed.\n", \
34 __FILE__, __LINE__)
35 #define DBC_REQUIRE DBC_ASSERT /* Function Precondition. */
36 #define DBC_ENSURE DBC_ASSERT /* Function Postcondition. */
38 #else
40 #define DBC_ASSERT(exp) {}
41 #define DBC_REQUIRE(exp) {}
42 #define DBC_ENSURE(exp) {}
44 #endif /* DEBUG */
46 #endif /* DBC_ */