lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /**************************************************************************
|
| 2 | *
|
| 3 | * Copyright (c) 2012 ZTE Corporation.
|
| 4 | *
|
| 5 | ***************************************************************************
|
| 6 | * Ä£ ¿é Ãû : P98C_OSS
|
| 7 | * ÎÄ ¼þ Ãû : oss_trace.h
|
| 8 | * Ïà¹ØÎļþ :
|
| 9 | * ʵÏÖ¹¦ÄÜ : ¸ú×Ù¹¦ÄܵÄÍ·Îļþ
|
| 10 | * ×÷ Õß : chenxingfang
|
| 11 | * °æ ±¾ : V1.0
|
| 12 | * Íê³ÉÈÕÆÚ : 2012-07-30
|
| 13 | * ÆäËü˵Ã÷ :
|
| 14 | **************************************************************************/
|
| 15 |
|
| 16 | /**************************************************************************
|
| 17 | * Ð޸ļǼ
|
| 18 | **************************************************************************/
|
| 19 | #ifndef _OSS_TRACE_H
|
| 20 | #define _OSS_TRACE_H
|
| 21 |
|
| 22 | /**************************************************************************
|
| 23 | * #includeÇø
|
| 24 | **************************************************************************/
|
| 25 | #ifdef __cplusplus
|
| 26 | extern "C"
|
| 27 | {
|
| 28 | #endif
|
| 29 |
|
| 30 | /**************************************************************************
|
| 31 | * ³£Á¿¶¨ÒåÇø
|
| 32 | **************************************************************************/
|
| 33 | #if defined (_OS_OSE) || defined (_OS_TOS)
|
| 34 | # define OSS_TRACE_FUNC
|
| 35 | # define OSS_TRACE_THREAD
|
| 36 | #endif
|
| 37 |
|
| 38 | #ifndef _OS_WIN
|
| 39 | #if defined OSS_TRACE_FUNC
|
| 40 | # define ZOSS_TRACE_FUNC_START() \
|
| 41 | { \
|
| 42 | static VOID *td = NULL; /* Trace Descriptor */ \
|
| 43 | oss_trace_func_start(&td, __FUNCTION__);
|
| 44 |
|
| 45 | # define ZOSS_TRACE_FUNC_END() \
|
| 46 | oss_trace_func_end(td); \
|
| 47 | }
|
| 48 |
|
| 49 | # define ZOSS_TRACE_FUNC_START_ALWAYS() \
|
| 50 | { \
|
| 51 | VOID *td = NULL; /* Trace Descriptor */ \
|
| 52 | oss_trace_func_start(&td, __FUNCTION__);
|
| 53 |
|
| 54 | # define ZOSS_TRACE_FUNC_END_ALWAYS() \
|
| 55 | oss_trace_func_end(td); \
|
| 56 | }
|
| 57 | #else
|
| 58 | # define ZOSS_TRACE_FUNC_START()
|
| 59 | # define ZOSS_TRACE_FUNC_END()
|
| 60 |
|
| 61 | # define ZOSS_TRACE_FUNC_START_ALWAYS()
|
| 62 | # define ZOSS_TRACE_FUNC_END_ALWAYS()
|
| 63 | #endif
|
| 64 | #endif
|
| 65 |
|
| 66 | /**************************************************************************
|
| 67 | * Êý¾Ý½á¹¹¶¨ÒåÇø
|
| 68 | **************************************************************************/
|
| 69 |
|
| 70 | /**************************************************************************
|
| 71 | * º¯ÊýÉùÃ÷Çø
|
| 72 | **************************************************************************/
|
| 73 | #ifdef OSS_TRACE_FUNC
|
| 74 | VOID oss_trace_thread_open(VOID);
|
| 75 | VOID oss_trace_thread_close(VOID);
|
| 76 | #endif
|
| 77 |
|
| 78 | VOID zOss_TraceFuncInit(VOID);
|
| 79 | VOID zOss_TraceFuncInfo(CHAR *func_name);
|
| 80 |
|
| 81 | /**************************************************************************
|
| 82 | * È«¾Ö±äÁ¿ÉùÃ÷Çø
|
| 83 | **************************************************************************/
|
| 84 |
|
| 85 | #ifdef __cplusplus
|
| 86 | }
|
| 87 | #endif
|
| 88 |
|
| 89 | #endif /* _OSS_TRACE_H */
|
| 90 |
|