VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/cr_error.h@ 46757

最後變更 在這個檔案從46757是 46757,由 vboxsync 提交於 12 年 前

wddm/crOpenGL: r0-based visible regions handling, r0-based chromium commands submission debugged, more on new presentation mechanism, cleanup, etc.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.8 KB
 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved.
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#ifndef CR_ERROR_H
8#define CR_ERROR_H
9
10#include <iprt/cdefs.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#ifndef __GNUC__
17#define NORETURN_PRINTF
18#define PRINTF
19#elif defined IN_GUEST
20#define NORETURN_PRINTF __attribute__ ((__noreturn__,format(printf,1,2)))
21#define PRINTF __attribute__ ((format(printf,1,2)))
22#else
23#define NORETURN_PRINTF
24#define PRINTF
25#endif
26
27DECLEXPORT(void) crEnableWarnings(int onOff);
28
29DECLEXPORT(void) crDebug(const char *format, ... ) PRINTF;
30#ifdef DEBUG_misha
31typedef void FNCRDEBUG(const char *format, ... ) PRINTF;
32typedef FNCRDEBUG *PFNCRDEBUG;
33DECLINLINE(PFNCRDEBUG) crGetDebug() {return crDebug;}
34# define crWarning (RT_BREAKPOINT(), crDebug)
35#else
36DECLEXPORT(void) crWarning(const char *format, ... ) PRINTF;
37#endif
38DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF;
39
40DECLEXPORT(void) crError(const char *format, ... ) NORETURN_PRINTF;
41
42/* Throw more info while opengl is not stable */
43#if defined(DEBUG) || 1
44# ifdef DEBUG_misha
45# include <iprt/assert.h>
46# define CRASSERT Assert
47//extern int g_VBoxFbgFBreakDdi;
48# define CR_DDI_PROLOGUE() do { /*if (g_VBoxFbgFBreakDdi) {Assert(0);}*/ } while (0)
49# else
50# define CRASSERT( PRED ) ((PRED)?(void)0:crWarning( "Assertion failed: %s, file %s, line %d", #PRED, __FILE__, __LINE__))
51# define CR_DDI_PROLOGUE() do {} while (0)
52# endif
53# define THREADASSERT( PRED ) ((PRED)?(void)0:crError( "Are you trying to run a threaded app ?\nBuild with 'make threadsafe'\nAssertion failed: %s, file %s, line %d", #PRED, __FILE__, __LINE__))
54#else
55# define CRASSERT( PRED ) ((void)0)
56# define THREADASSERT( PRED ) ((void)0)
57# define CR_DDI_PROLOGUE() do {} while (0)
58#endif
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* CR_ERROR_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette