Debian Codegraph @

tests/aslts/src/runtime/collections/bdemo/ACPICA/0218/DECL.asl

raw
1 /*
2 * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 /*
29 * Bug 218:
30 *
31 * SUMMARY: Access to internal object of Method is lost after returning from the recursive call to that Method
32 *
33 * NOTE: Reaction on the situation generated by the test should be fixed according to this:
34 *
35 * >-----Original Message-----
36 * >From: Moore, Robert
37 * >Sent: Tuesday, September 12, 2006 10:56 PM
38 * >To: Moore, Robert
39 * >Subject: ACPICA version 20060912 released [Code Attached]
40 * >
41 * >12 September 2006. Summary of changes for version 20060912:
42 * >
43 * >1) ACPI CA Core Subsystem:
44 * >
45 * > .....................
46 * >
47 * >Fixed a regression where an error was no longer emitted if a control method
48 * >attempts to create 2 objects of the same name. This once again returns
49 * >AE_ALREADY_EXISTS. When this exception occurs, it invokes the mechanism
50 * >that will dynamically serialize the control method to possibly prevent
51 * >future errors. (BZ 440)
52 * > .....................
53 */
54 Method (M037, 0, Serialized)
55 {
56 Name (I000, 0x00)
57 I000 = ID29 /* \ID29 */
58 Local0 = ID29 /* \ID29 */
59 Debug = "===== Start of test"
60 Debug = ID29 /* \ID29 */
61 Debug = I000 /* \M037.I000 */
62 Debug = Local0
63 ID29++
64 If ((ID29 < 0x0A))
65 {
66 M037 ()
67 }
68
69 ID29--
70 Debug = "===== Finish of test"
71 Debug = ID29 /* \ID29 */
72 Debug = I000 /* \M037.I000 */
73 Debug = Local0
74 If ((I000 != ID29))
75 {
76 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, I000, ID29)
77 }
78
79 If ((Local0 != ID29))
80 {
81 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, ID29)
82 }
83 }
84
85 Method (M038, 0, NotSerialized)
86 {
87 CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
88 M037 ()
89 CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
90 }