Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

kHlpAssert.h File Reference


Detailed Description

kHlpAssert - Assertion Macros.

Definition in file kHlpAssert.h.

#include <k/kHlpDefs.h>

Go to the source code of this file.

Defines

#define kHlpAssert(expr)   do { } while (0)
#define kHlpAssertFailed()   kHlpAssert(0)
#define kHlpAssertFailedReturn(rcRet)   kHlpAssertReturn(0, (rcRet))
#define kHlpAssertFailedReturnVoid()   kHlpAssertReturnVoid(0)
#define kHlpAssertMsg(expr, msg)   do { } while (0)
#define kHlpAssertMsgFailed(msg)   kHlpAssertMsg(0, msg)
#define kHlpAssertMsgFailedReturn(msg, rcRet)   kHlpAssertMsgReturn(0, msg, (rcRet))
#define kHlpAssertMsgFailedReturnVoid(msg)   kHlpAssertMsgReturnVoid(0, msg))
#define kHlpAssertMsgReturn(expr, msg, rcRet)   do { if (!(expr)) return (rcRet); } while (0)
#define kHlpAssertMsgReturnVoid(expr, msg)   do { if (!(expr)) return; } while (0)
#define kHlpAssertPtr(ptr)   kHlpAssertMsg(K_VALID_PTR(ptr), ("%s = %p\n", #ptr, (ptr)))
#define kHlpAssertPtrNull(ptr)   kHlpAssertMsg(!(ptr) || K_VALID_PTR(ptr), ("%s = %p\n", #ptr, (ptr)))
#define kHlpAssertPtrNullReturn(ptr, rcRet)   kHlpAssertMsgReturn(!(ptr) || K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)), (rcRet))
#define kHlpAssertPtrNullReturnVoid(ptr)   kHlpAssertMsgReturnVoid(!(ptr) || K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)))
#define kHlpAssertPtrReturn(ptr, rcRet)   kHlpAssertMsgReturn(K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)), (rcRet))
#define kHlpAssertPtrReturnVoid(ptr)   kHlpAssertMsgReturnVoid(K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)))
#define kHlpAssertRC(rc)   kHlpAssertMsg((rc) == 0, ("%s = %d\n", #rc, (rc)))
#define kHlpAssertRCReturn(rc, rcRet)   kHlpAssertMsgReturn((rc) == 0, ("%s = %d -> %d\n", #rc, (rc), (rcRet)), (rcRet))
#define kHlpAssertRCReturnVoid(rc)   kHlpAssertMsgReturnVoid((rc) == 0, ("%s = %d -> %d\n", #rc, (rc), (rcRet)))
#define kHlpAssertReturn(expr, rcRet)   do { if (!(expr)) return (rcRet); } while (0)
#define kHlpAssertReturnVoid(expr)   do { if (!(expr)) return; } while (0)

Functions

 KHLP_DECL (void) kHlpFree(void *pv)

Variables

const char unsigned iLine
const char * pszFile
const char unsigned const char * pszFunction


Generated by  Doxygen 1.6.0   Back to index