lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2007, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: drvs_assert.h
|
| 5 | * File Mark:
|
| 6 | * Description:
|
| 7 | * Others:
|
| 8 | * Version: v0.1
|
| 9 | * Author: weizhigang
|
| 10 | * Date: 2009-7-3
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | * History 2:
|
| 17 | ********************************************************************************/
|
| 18 |
|
| 19 | #ifndef _DRVS_ASSERT_H
|
| 20 | #define _DRVS_ASSERT_H
|
| 21 |
|
| 22 |
|
| 23 | /****************************************************************************
|
| 24 | * Include files
|
| 25 | ****************************************************************************/
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 | /****************************************************************************
|
| 30 | * Function Prototypes
|
| 31 | ****************************************************************************/
|
| 32 | #if 0
|
| 33 | VOID zDrvExcep_Handler(CHAR *pExp,
|
| 34 | const CHAR * pcFileName,
|
| 35 | const CHAR * pcFuncName,
|
| 36 | UINT32 dwLineNum);
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 | /****************************************************************************
|
| 41 | * Macros
|
| 42 | ****************************************************************************/
|
| 43 | #ifdef _DEBUG
|
| 44 | #ifdef _OS_WIN
|
| 45 | #define zDrv_ASSERT(_EXP)
|
| 46 | #else
|
| 47 | #define zDrv_ASSERT(_EXP) do{if(!(_EXP)) zDrvExcep_Handler(#_EXP,(CHAR *)__FILE__,(CHAR *)__FUNCTION__,__LINE__);}while(0)
|
| 48 | #endif
|
| 49 | #else
|
| 50 | #define zDrv_ASSERT(_EXP)
|
| 51 | #endif
|
| 52 | #endif
|
| 53 |
|
| 54 | #define zDrv_ASSERT(_EXP) zOss_ASSERT(_EXP)
|
| 55 | #define zDrv_AssertEx(FalseCondition, code) {if (FalseCondition) { zDrv_ASSERT(0); return code; }}
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 | #endif/*_DRVS_ASSERT_H*/
|
| 61 |
|