mirror of
https://github.com/acpica/acpica/
synced 2025-01-25 10:52:02 +03:00
Completed rename of all globals to prefix "AcpiGbl_", added stack
tracing mechanism date 2001.08.27.15.39.00; author rmoore1; state Exp;
This commit is contained in:
parent
e8fdbfd061
commit
2d62247f55
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 1.88 $
|
||||
* $Revision: 1.90 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -460,31 +460,31 @@
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
|
||||
#define REPORT_INFO(fp) {_ReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
#define REPORT_INFO(fp) {AcpiUtReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define REPORT_ERROR(fp) {_ReportError(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
#define REPORT_ERROR(fp) {AcpiUtReportError(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define REPORT_WARNING(fp) {_ReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
#define REPORT_WARNING(fp) {AcpiUtReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
|
||||
#else
|
||||
|
||||
#define REPORT_INFO(fp) {_ReportInfo("ACPI",__LINE__,_COMPONENT); \
|
||||
#define REPORT_INFO(fp) {AcpiUtReportInfo("ACPI",__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define REPORT_ERROR(fp) {_ReportError("ACPI",__LINE__,_COMPONENT); \
|
||||
#define REPORT_ERROR(fp) {AcpiUtReportError("ACPI",__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define REPORT_WARNING(fp) {_ReportWarning("ACPI",__LINE__,_COMPONENT); \
|
||||
#define REPORT_WARNING(fp) {AcpiUtReportWarning("ACPI",__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
|
||||
#endif
|
||||
|
||||
/* Error reporting. These versions pass thru the module and line# */
|
||||
|
||||
#define _REPORT_INFO(a,b,c,fp) {_ReportInfo(a,b,c); \
|
||||
#define _REPORT_INFO(a,b,c,fp) {AcpiUtReportInfo(a,b,c); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define _REPORT_ERROR(a,b,c,fp) {_ReportError(a,b,c); \
|
||||
#define _REPORT_ERROR(a,b,c,fp) {AcpiUtReportError(a,b,c); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
#define _REPORT_WARNING(a,b,c,fp) {_ReportWarning(a,b,c); \
|
||||
#define _REPORT_WARNING(a,b,c,fp) {AcpiUtReportWarning(a,b,c); \
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
|
||||
/* Buffer dump macros */
|
||||
@ -505,15 +505,19 @@
|
||||
* as a local string ("_ProcName) so that it can be also used by the function exit macros below.
|
||||
*/
|
||||
|
||||
#define PROC_NAME(a) char * _ProcName = a;
|
||||
#define FUNCTION_TRACE(a) char * _ProcName = a;\
|
||||
AcpiUtTrace(_THIS_MODULE,__LINE__,_COMPONENT,a)
|
||||
#define FUNCTION_TRACE_PTR(a,b) char * _ProcName = a;\
|
||||
AcpiUtTracePtr(_THIS_MODULE,__LINE__,_COMPONENT,a,(void *)b)
|
||||
#define FUNCTION_TRACE_U32(a,b) char * _ProcName = a;\
|
||||
AcpiUtTraceU32(_THIS_MODULE,__LINE__,_COMPONENT,a,(UINT32)b)
|
||||
#define FUNCTION_TRACE_STR(a,b) char * _ProcName = a;\
|
||||
AcpiUtTraceStr(_THIS_MODULE,__LINE__,_COMPONENT,a,(NATIVE_CHAR *)b)
|
||||
#define PROC_NAME(a) ACPI_DEBUG_PRINT_INFO _Dbg; \
|
||||
_Dbg.ComponentId = _COMPONENT; \
|
||||
_Dbg.ProcName = a; \
|
||||
_Dbg.ModuleName = _THIS_MODULE;
|
||||
|
||||
#define FUNCTION_TRACE(a) PROC_NAME(a)\
|
||||
AcpiUtTrace(__LINE__,&_Dbg)
|
||||
#define FUNCTION_TRACE_PTR(a,b) PROC_NAME(a)\
|
||||
AcpiUtTracePtr(__LINE__,&_Dbg,(void *)b)
|
||||
#define FUNCTION_TRACE_U32(a,b) PROC_NAME(a)\
|
||||
AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
|
||||
#define FUNCTION_TRACE_STR(a,b) PROC_NAME(a)\
|
||||
AcpiUtTraceStr(__LINE__,&_Dbg,(NATIVE_CHAR *)b)
|
||||
/*
|
||||
* Function exit tracing.
|
||||
* WARNING: These macros include a return statement. This is usually considered
|
||||
@ -521,10 +525,10 @@
|
||||
* One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
|
||||
* so that "_ProcName" is defined.
|
||||
*/
|
||||
#define return_VOID {AcpiUtExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName);return;}
|
||||
#define return_ACPI_STATUS(s) {AcpiUtStatusExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
|
||||
#define return_VALUE(s) {AcpiUtValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
|
||||
#define return_PTR(s) {AcpiUtPtrExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(UINT8 *)s);return(s);}
|
||||
#define return_VOID {AcpiUtExit(__LINE__,&_Dbg);return;}
|
||||
#define return_ACPI_STATUS(s) {AcpiUtStatusExit(__LINE__,&_Dbg,s);return(s);}
|
||||
#define return_VALUE(s) {AcpiUtValueExit(__LINE__,&_Dbg,s);return(s);}
|
||||
#define return_PTR(s) {AcpiUtPtrExit(__LINE__,&_Dbg,(UINT8 *)s);return(s);}
|
||||
|
||||
|
||||
/* Conditional execution */
|
||||
@ -636,19 +640,15 @@
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
|
||||
/*
|
||||
* 1) Set name to blanks
|
||||
* 2) Copy the object name
|
||||
*/
|
||||
|
||||
#define ADD_OBJECT_NAME(a,b) MEMSET (a->Common.Name, ' ', sizeof (a->Common.Name));\
|
||||
STRNCPY (a->Common.Name, AcpiGbl_NsTypeNames[b], sizeof (a->Common.Name))
|
||||
|
||||
#else
|
||||
|
||||
#define ADD_OBJECT_NAME(a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -678,4 +678,6 @@
|
||||
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
|
||||
|
||||
|
||||
#define ACPI_GET_STACK_POINTER _asm {mov eax, ebx}
|
||||
|
||||
#endif /* ACMACROS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user