blob: f19e464ffa6c92dd7ad4644c9c5f6c17f524d540 [file] [log] [blame]
/*******************************************************************************
* Copyright (C) 2007, ZTE Corporation.
*
* File Name: drvs_assert.h
* File Mark:
* Description:
* Others:
* Version: v0.1
* Author: weizhigang
* Date: 2009-7-3
* History 1:
* Date:
* Version:
* Author:
* Modification:
* History 2:
********************************************************************************/
#ifndef _DRVS_ASSERT_H
#define _DRVS_ASSERT_H
/****************************************************************************
* Include files
****************************************************************************/
/****************************************************************************
* Function Prototypes
****************************************************************************/
#if 0
VOID zDrvExcep_Handler(CHAR *pExp,
const CHAR * pcFileName,
const CHAR * pcFuncName,
UINT32 dwLineNum);
/****************************************************************************
* Macros
****************************************************************************/
#ifdef _DEBUG
#ifdef _OS_WIN
#define zDrv_ASSERT(_EXP)
#else
#define zDrv_ASSERT(_EXP) do{if(!(_EXP)) zDrvExcep_Handler(#_EXP,(CHAR *)__FILE__,(CHAR *)__FUNCTION__,__LINE__);}while(0)
#endif
#else
#define zDrv_ASSERT(_EXP)
#endif
#endif
#define zDrv_ASSERT(_EXP) zOss_ASSERT(_EXP)
#define zDrv_AssertEx(FalseCondition, code) {if (FalseCondition) { zDrv_ASSERT(0); return code; }}
#endif/*_DRVS_ASSERT_H*/