acutils.h revision 71867
1/******************************************************************************
2 *
3 * Name: accommon.h -- prototypes for the common (subsystem-wide) procedures
4 *       $Revision: 87 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
13 * All rights reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights.  You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.
21 *
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
28 *
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code.  No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
37 *
38 * The above copyright and patent license is granted only if the following
39 * conditions are met:
40 *
41 * 3. Conditions
42 *
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision.  In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change.  Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee.  Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
54 *
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution.  In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
65 * make.
66 *
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
71 * distribution.
72 *
73 * 3.4. Intel retains all right, title, and interest in and to the Original
74 * Intel Code.
75 *
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
80 *
81 * 4. Disclaimer and Export Compliance
82 *
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89 * PARTICULAR PURPOSE.
90 *
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98 * LIMITED REMEDY.
99 *
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government.  In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
114 *
115 *****************************************************************************/
116
117#ifndef _ACCOMMON_H
118#define _ACCOMMON_H
119
120
121#define REF_INCREMENT       (UINT16) 0
122#define REF_DECREMENT       (UINT16) 1
123#define REF_FORCE_DELETE    (UINT16) 2
124
125/* AcpiCmDumpBuffer */
126
127#define DB_BYTE_DISPLAY     1
128#define DB_WORD_DISPLAY     2
129#define DB_DWORD_DISPLAY    4
130#define DB_QWORD_DISPLAY    8
131
132
133/* Global initialization interfaces */
134
135void
136AcpiCmInitGlobals (
137    void);
138
139void
140AcpiCmTerminate (
141    void);
142
143
144/*
145 * CmInit - miscellaneous initialization and shutdown
146 */
147
148ACPI_STATUS
149AcpiCmHardwareInitialize (
150    void);
151
152ACPI_STATUS
153AcpiCmSubsystemShutdown (
154    void);
155
156ACPI_STATUS
157AcpiCmValidateFadt (
158    void);
159
160/*
161 * CmGlobal - Global data structures and procedures
162 */
163
164#ifdef ACPI_DEBUG
165
166NATIVE_CHAR *
167AcpiCmGetMutexName (
168    UINT32                  MutexId);
169
170NATIVE_CHAR *
171AcpiCmGetTypeName (
172    UINT32                  Type);
173
174NATIVE_CHAR *
175AcpiCmGetRegionName (
176    UINT8                   SpaceId);
177
178#endif
179
180
181BOOLEAN
182AcpiCmValidObjectType (
183    UINT32                  Type);
184
185ACPI_OWNER_ID
186AcpiCmAllocateOwnerId (
187    UINT32                  IdType);
188
189
190/*
191 * CmClib - Local implementations of C library functions
192 */
193
194#ifndef ACPI_USE_SYSTEM_CLIBRARY
195
196NATIVE_UINT
197AcpiCmStrlen (
198    const NATIVE_CHAR       *String);
199
200NATIVE_CHAR *
201AcpiCmStrcpy (
202    NATIVE_CHAR             *DstString,
203    const NATIVE_CHAR       *SrcString);
204
205NATIVE_CHAR *
206AcpiCmStrncpy (
207    NATIVE_CHAR             *DstString,
208    const NATIVE_CHAR       *SrcString,
209    NATIVE_UINT             Count);
210
211UINT32
212AcpiCmStrncmp (
213    const NATIVE_CHAR       *String1,
214    const NATIVE_CHAR       *String2,
215    NATIVE_UINT             Count);
216
217UINT32
218AcpiCmStrcmp (
219    const NATIVE_CHAR       *String1,
220    const NATIVE_CHAR       *String2);
221
222NATIVE_CHAR *
223AcpiCmStrcat (
224    NATIVE_CHAR             *DstString,
225    const NATIVE_CHAR       *SrcString);
226
227NATIVE_CHAR *
228AcpiCmStrncat (
229    NATIVE_CHAR             *DstString,
230    const NATIVE_CHAR       *SrcString,
231    NATIVE_UINT             Count);
232
233UINT32
234AcpiCmStrtoul (
235    const NATIVE_CHAR       *String,
236    NATIVE_CHAR             **Terminator,
237    NATIVE_UINT             Base);
238
239NATIVE_CHAR *
240AcpiCmStrstr (
241    NATIVE_CHAR             *String1,
242    NATIVE_CHAR             *String2);
243
244NATIVE_CHAR *
245AcpiCmStrupr (
246    NATIVE_CHAR             *SrcString);
247
248void *
249AcpiCmMemcpy (
250    void                    *Dest,
251    const void              *Src,
252    NATIVE_UINT             Count);
253
254void *
255AcpiCmMemset (
256    void                    *Dest,
257    NATIVE_UINT             Value,
258    NATIVE_UINT             Count);
259
260UINT32
261AcpiCmToUpper (
262    UINT32                  c);
263
264UINT32
265AcpiCmToLower (
266    UINT32                  c);
267
268#endif /* ACPI_USE_SYSTEM_CLIBRARY */
269
270/*
271 * CmCopy - Object construction and conversion interfaces
272 */
273
274ACPI_STATUS
275AcpiCmBuildSimpleObject(
276    ACPI_OPERAND_OBJECT     *Obj,
277    ACPI_OBJECT             *UserObj,
278    UINT8                   *DataSpace,
279    UINT32                  *BufferSpaceUsed);
280
281ACPI_STATUS
282AcpiCmBuildPackageObject (
283    ACPI_OPERAND_OBJECT     *Obj,
284    UINT8                   *Buffer,
285    UINT32                  *SpaceUsed);
286
287ACPI_STATUS
288AcpiCmBuildExternalObject (
289    ACPI_OPERAND_OBJECT     *Obj,
290    ACPI_BUFFER             *RetBuffer);
291
292ACPI_STATUS
293AcpiCmBuildInternalSimpleObject(
294    ACPI_OBJECT             *UserObj,
295    ACPI_OPERAND_OBJECT     *Obj);
296
297ACPI_STATUS
298AcpiCmBuildInternalObject (
299    ACPI_OBJECT             *Obj,
300    ACPI_OPERAND_OBJECT     *InternalObj);
301
302ACPI_STATUS
303AcpiCmCopyInternalSimpleObject (
304    ACPI_OPERAND_OBJECT     *SourceObj,
305    ACPI_OPERAND_OBJECT     *DestObj);
306
307ACPI_STATUS
308AcpiCmBuildCopyInternalPackageObject (
309    ACPI_OPERAND_OBJECT     *SourceObj,
310    ACPI_OPERAND_OBJECT     *DestObj);
311
312
313/*
314 * CmCreate - Object creation
315 */
316
317ACPI_STATUS
318AcpiCmUpdateObjectReference (
319    ACPI_OPERAND_OBJECT     *Object,
320    UINT16                  Action);
321
322ACPI_OPERAND_OBJECT  *
323_CmCreateInternalObject (
324    NATIVE_CHAR             *ModuleName,
325    UINT32                  LineNumber,
326    UINT32                  ComponentId,
327    OBJECT_TYPE_INTERNAL    Type);
328
329
330/*
331 * CmDebug - Debug interfaces
332 */
333
334UINT32
335GetDebugLevel (
336    void);
337
338void
339SetDebugLevel (
340    UINT32                  level);
341
342void
343FunctionTrace (
344    NATIVE_CHAR             *ModuleName,
345    UINT32                  LineNumber,
346    UINT32                  ComponentId,
347    NATIVE_CHAR             *FunctionName);
348
349void
350FunctionTracePtr (
351    NATIVE_CHAR             *ModuleName,
352    UINT32                  LineNumber,
353    UINT32                  ComponentId,
354    NATIVE_CHAR             *FunctionName,
355    void                    *Pointer);
356
357void
358FunctionTraceU32 (
359    NATIVE_CHAR             *ModuleName,
360    UINT32                  LineNumber,
361    UINT32                  ComponentId,
362    NATIVE_CHAR             *FunctionName,
363    UINT32                  Integer);
364
365void
366FunctionTraceStr (
367    NATIVE_CHAR             *ModuleName,
368    UINT32                  LineNumber,
369    UINT32                  ComponentId,
370    NATIVE_CHAR             *FunctionName,
371    NATIVE_CHAR             *String);
372
373void
374FunctionExit (
375    NATIVE_CHAR             *ModuleName,
376    UINT32                  LineNumber,
377    UINT32                  ComponentId,
378    NATIVE_CHAR             *FunctionName);
379
380void
381FunctionStatusExit (
382    NATIVE_CHAR             *ModuleName,
383    UINT32                  LineNumber,
384    UINT32                  ComponentId,
385    NATIVE_CHAR             *FunctionName,
386    ACPI_STATUS             Status);
387
388void
389FunctionValueExit (
390    NATIVE_CHAR             *ModuleName,
391    UINT32                  LineNumber,
392    UINT32                  ComponentId,
393    NATIVE_CHAR             *FunctionName,
394    ACPI_INTEGER            Value);
395
396void
397FunctionPtrExit (
398    NATIVE_CHAR             *ModuleName,
399    UINT32                  LineNumber,
400    UINT32                  ComponentId,
401    NATIVE_CHAR             *FunctionName,
402    UINT8                   *Ptr);
403
404void
405DebugPrintPrefix (
406    NATIVE_CHAR             *ModuleName,
407    UINT32                  LineNumber);
408
409void
410DebugPrint (
411    NATIVE_CHAR             *ModuleName,
412    UINT32                  LineNumber,
413    UINT32                  ComponentId,
414    UINT32                  PrintLevel,
415    NATIVE_CHAR             *Format, ...);
416
417void
418DebugPrintRaw (
419    NATIVE_CHAR             *Format, ...);
420
421void
422_ReportInfo (
423    NATIVE_CHAR             *ModuleName,
424    UINT32                  LineNumber,
425    UINT32                  ComponentId);
426
427void
428_ReportError (
429    NATIVE_CHAR             *ModuleName,
430    UINT32                  LineNumber,
431    UINT32                  ComponentId);
432
433void
434_ReportWarning (
435    NATIVE_CHAR             *ModuleName,
436    UINT32                  LineNumber,
437    UINT32                  ComponentId);
438
439void
440AcpiCmDumpBuffer (
441    UINT8                   *Buffer,
442    UINT32                  Count,
443    UINT32                  Display,
444    UINT32                  componentId);
445
446
447/*
448 * CmDelete - Object deletion
449 */
450
451void
452AcpiCmDeleteInternalObj (
453    ACPI_OPERAND_OBJECT     *Object);
454
455void
456AcpiCmDeleteInternalPackageObject (
457    ACPI_OPERAND_OBJECT     *Object);
458
459void
460AcpiCmDeleteInternalSimpleObject (
461    ACPI_OPERAND_OBJECT     *Object);
462
463ACPI_STATUS
464AcpiCmDeleteInternalObjectList (
465    ACPI_OPERAND_OBJECT     **ObjList);
466
467
468/*
469 * CmEval - object evaluation
470 */
471
472/* Method name strings */
473
474#define METHOD_NAME__HID        "_HID"
475#define METHOD_NAME__UID        "_UID"
476#define METHOD_NAME__ADR        "_ADR"
477#define METHOD_NAME__STA        "_STA"
478#define METHOD_NAME__REG        "_REG"
479#define METHOD_NAME__SEG        "_SEG"
480#define METHOD_NAME__BBN        "_BBN"
481
482
483ACPI_STATUS
484AcpiCmEvaluateNumericObject (
485    NATIVE_CHAR             *ObjectName,
486    ACPI_NAMESPACE_NODE     *DeviceNode,
487    ACPI_INTEGER            *Address);
488
489ACPI_STATUS
490AcpiCmExecute_HID (
491    ACPI_NAMESPACE_NODE     *DeviceNode,
492    DEVICE_ID               *Hid);
493
494ACPI_STATUS
495AcpiCmExecute_STA (
496    ACPI_NAMESPACE_NODE     *DeviceNode,
497    UINT32                  *StatusFlags);
498
499ACPI_STATUS
500AcpiCmExecute_UID (
501    ACPI_NAMESPACE_NODE     *DeviceNode,
502    DEVICE_ID               *Uid);
503
504
505/*
506 * CmError - exception interfaces
507 */
508
509NATIVE_CHAR *
510AcpiCmFormatException (
511    ACPI_STATUS             Status);
512
513
514/*
515 * CmMutex - mutual exclusion interfaces
516 */
517
518ACPI_STATUS
519AcpiCmMutexInitialize (
520    void);
521
522void
523AcpiCmMutexTerminate (
524    void);
525
526ACPI_STATUS
527AcpiCmCreateMutex (
528    ACPI_MUTEX_HANDLE       MutexId);
529
530ACPI_STATUS
531AcpiCmDeleteMutex (
532    ACPI_MUTEX_HANDLE       MutexId);
533
534ACPI_STATUS
535AcpiCmAcquireMutex (
536    ACPI_MUTEX_HANDLE       MutexId);
537
538ACPI_STATUS
539AcpiCmReleaseMutex (
540    ACPI_MUTEX_HANDLE       MutexId);
541
542
543/*
544 * CmObject - internal object create/delete/cache routines
545 */
546
547void *
548_CmAllocateObjectDesc (
549    NATIVE_CHAR             *ModuleName,
550    UINT32                  LineNumber,
551    UINT32                  ComponentId);
552
553#define AcpiCmCreateInternalObject(t)   _CmCreateInternalObject(_THIS_MODULE,__LINE__,_COMPONENT,t)
554#define AcpiCmAllocateObjectDesc()      _CmAllocateObjectDesc(_THIS_MODULE,__LINE__,_COMPONENT)
555
556void
557AcpiCmDeleteObjectDesc (
558    ACPI_OPERAND_OBJECT     *Object);
559
560BOOLEAN
561AcpiCmValidInternalObject (
562    void                    *Object);
563
564
565/*
566 * CmRefCnt - Object reference count management
567 */
568
569void
570AcpiCmAddReference (
571    ACPI_OPERAND_OBJECT     *Object);
572
573void
574AcpiCmRemoveReference (
575    ACPI_OPERAND_OBJECT     *Object);
576
577/*
578 * CmSize - Object size routines
579 */
580
581ACPI_STATUS
582AcpiCmGetSimpleObjectSize (
583    ACPI_OPERAND_OBJECT     *Obj,
584    UINT32                  *ObjLength);
585
586ACPI_STATUS
587AcpiCmGetPackageObjectSize (
588    ACPI_OPERAND_OBJECT     *Obj,
589    UINT32                  *ObjLength);
590
591ACPI_STATUS
592AcpiCmGetObjectSize(
593    ACPI_OPERAND_OBJECT     *Obj,
594    UINT32                  *ObjLength);
595
596
597/*
598 * CmState - Generic state creation/cache routines
599 */
600
601void
602AcpiCmPushGenericState (
603    ACPI_GENERIC_STATE      **ListHead,
604    ACPI_GENERIC_STATE      *State);
605
606ACPI_GENERIC_STATE *
607AcpiCmPopGenericState (
608    ACPI_GENERIC_STATE      **ListHead);
609
610
611ACPI_GENERIC_STATE *
612AcpiCmCreateGenericState (
613    void);
614
615ACPI_GENERIC_STATE *
616AcpiCmCreateUpdateState (
617    ACPI_OPERAND_OBJECT     *Object,
618    UINT16                  Action);
619
620ACPI_STATUS
621AcpiCmCreateUpdateStateAndPush (
622    ACPI_OPERAND_OBJECT     *Object,
623    UINT16                  Action,
624    ACPI_GENERIC_STATE      **StateList);
625
626ACPI_GENERIC_STATE *
627AcpiCmCreateControlState (
628    void);
629
630void
631AcpiCmDeleteGenericState (
632    ACPI_GENERIC_STATE      *State);
633
634void
635AcpiCmDeleteGenericStateCache (
636    void);
637
638void
639AcpiCmDeleteObjectCache (
640    void);
641
642/*
643 * Cmutils
644 */
645
646BOOLEAN
647AcpiCmValidAcpiName (
648    UINT32                  Name);
649
650BOOLEAN
651AcpiCmValidAcpiCharacter (
652    NATIVE_CHAR             Character);
653
654ACPI_STATUS
655AcpiCmResolvePackageReferences (
656    ACPI_OPERAND_OBJECT     *ObjDesc);
657
658
659/*
660 * Memory allocation functions and related macros.
661 * Macros that expand to include filename and line number
662 */
663
664void *
665_CmAllocate (
666    UINT32                  Size,
667    UINT32                  Component,
668    NATIVE_CHAR             *Module,
669    UINT32                  Line);
670
671void *
672_CmCallocate (
673    UINT32                  Size,
674    UINT32                  Component,
675    NATIVE_CHAR             *Module,
676    UINT32                  Line);
677
678void
679_CmFree (
680    void                    *Address,
681    UINT32                  Component,
682    NATIVE_CHAR             *Module,
683    UINT32                  Line);
684
685void
686AcpiCmInitStaticObject (
687    ACPI_OPERAND_OBJECT     *ObjDesc);
688
689#define AcpiCmAllocate(a)               _CmAllocate(a,_COMPONENT,_THIS_MODULE,__LINE__)
690#define AcpiCmCallocate(a)              _CmCallocate(a, _COMPONENT,_THIS_MODULE,__LINE__)
691#define AcpiCmFree(a)                   _CmFree(a,_COMPONENT,_THIS_MODULE,__LINE__)
692
693#ifndef ACPI_DEBUG_TRACK_ALLOCATIONS
694
695#define AcpiCmAddElementToAllocList(a,b,c,d,e,f)
696#define AcpiCmDeleteElementFromAllocList(a,b,c,d)
697#define AcpiCmDumpCurrentAllocations(a,b)
698#define AcpiCmDumpAllocationInfo()
699
700#define DECREMENT_OBJECT_METRICS(a)
701#define INCREMENT_OBJECT_METRICS(a)
702#define INITIALIZE_ALLOCATION_METRICS()
703#define DECREMENT_NAME_TABLE_METRICS(a)
704#define INCREMENT_NAME_TABLE_METRICS(a)
705
706#else
707
708#define INITIALIZE_ALLOCATION_METRICS() \
709    AcpiGbl_CurrentObjectCount = 0; \
710    AcpiGbl_CurrentObjectSize = 0; \
711    AcpiGbl_RunningObjectCount = 0; \
712    AcpiGbl_RunningObjectSize = 0; \
713    AcpiGbl_MaxConcurrentObjectCount = 0; \
714    AcpiGbl_MaxConcurrentObjectSize = 0; \
715    AcpiGbl_CurrentAllocSize = 0; \
716    AcpiGbl_CurrentAllocCount = 0; \
717    AcpiGbl_RunningAllocSize = 0; \
718    AcpiGbl_RunningAllocCount = 0; \
719    AcpiGbl_MaxConcurrentAllocSize = 0; \
720    AcpiGbl_MaxConcurrentAllocCount = 0; \
721    AcpiGbl_CurrentNodeCount = 0; \
722    AcpiGbl_CurrentNodeSize = 0; \
723    AcpiGbl_MaxConcurrentNodeCount = 0
724
725
726#define DECREMENT_OBJECT_METRICS(a) \
727    AcpiGbl_CurrentObjectCount--; \
728    AcpiGbl_CurrentObjectSize -= a
729
730#define INCREMENT_OBJECT_METRICS(a) \
731    AcpiGbl_CurrentObjectCount++; \
732    AcpiGbl_RunningObjectCount++; \
733    if (AcpiGbl_MaxConcurrentObjectCount < AcpiGbl_CurrentObjectCount) \
734    { \
735        AcpiGbl_MaxConcurrentObjectCount = AcpiGbl_CurrentObjectCount; \
736    } \
737    AcpiGbl_RunningObjectSize += a; \
738    AcpiGbl_CurrentObjectSize += a; \
739    if (AcpiGbl_MaxConcurrentObjectSize < AcpiGbl_CurrentObjectSize) \
740    { \
741        AcpiGbl_MaxConcurrentObjectSize = AcpiGbl_CurrentObjectSize; \
742    }
743
744#define DECREMENT_NAME_TABLE_METRICS(a) \
745    AcpiGbl_CurrentNodeCount--; \
746    AcpiGbl_CurrentNodeSize -= (a)
747
748#define INCREMENT_NAME_TABLE_METRICS(a) \
749    AcpiGbl_CurrentNodeCount++; \
750    AcpiGbl_CurrentNodeSize+= (a); \
751    if (AcpiGbl_MaxConcurrentNodeCount < AcpiGbl_CurrentNodeCount) \
752    { \
753        AcpiGbl_MaxConcurrentNodeCount = AcpiGbl_CurrentNodeCount; \
754    } \
755
756
757void
758AcpiCmDumpAllocationInfo (
759    void);
760
761void
762AcpiCmDumpCurrentAllocations (
763    UINT32                  Component,
764    NATIVE_CHAR             *Module);
765
766#endif
767
768
769#endif /* _ACCOMMON_H */
770