Debian Codegraph @

tests/aslts/src/runtime/collections/functional/synchronization/mutex.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 * Synchronization (mutexes)
30 *
31 * The test for ASL-Mutexes to be run on a single invocation only
32 */
33 /*
34 * Mutex + Acquire + Release
35 *
36 * The test actions exercise the (Mutex + Acquire + Release)
37 * operators adhering to the following ACPI-specified rules
38 * (some of them are verified):
39 *
40 * - creates a data mutex synchronization object,
41 * with level from 0 to 15 specified by SyncLevel,
42 * - a Mutex is not owned by a different invocation so it is owned
43 * immediately,
44 * - acquiring ownership of a Mutex can be nested,
45 * - a Mutex can be acquired more than once by the same invocation,
46 * - Acquire returns False if a timeout not occurred and the mutex
47 * ownership was successfully acquired,
48 * - to prevent deadlocks, wherever more than one synchronization
49 * object must be owned, the synchronization objects must always
50 * be released in the order opposite the order in which they were
51 * acquired,
52 * - all Acquire terms must refer to a synchronization object with
53 * an equal or greater SyncLevel to current level,
54 * - all Release terms must refer to a synchronization object with
55 * equal or lower SyncLevel to the current level,
56 * - after all the acquired mutexes of the current level are released
57 * the top occupied levels declines to the nearest occupied level,
58 * - Acquire increases the counter of mutex by one,
59 * - Release decreases the counter of mutex by one.
60 */
61 /* Acquire methods */
62 /* m01X(<method name>, <mux0>, <mux1>, <mux2>, <mux3>) */
63 /* Release methods */
64 /* m02X(<method name>, <mux0>, <mux1>, <mux2>, <mux3>) */
65 /* ================================================= Acquire methods */
66 Method (M010, 5, NotSerialized)
67 {
68 If (Arg1)
69 {
70 CH00 (Arg0, 0x00, 0x00, Acquire (T000, 0x0000))
71 }
72
73 If (Arg2)
74 {
75 CH00 (Arg0, 0x00, 0x01, Acquire (T001, 0xFFFF))
76 }
77
78 If (Arg3)
79 {
80 CH00 (Arg0, 0x00, 0x02, Acquire (T002, 0x8000))
81 }
82
83 If (Arg4)
84 {
85 CH00 (Arg0, 0x00, 0x03, Acquire (T003, 0x1000))
86 }
87 }
88
89 Method (M011, 5, NotSerialized)
90 {
91 If (Arg1)
92 {
93 CH00 (Arg0, 0x01, 0x00, Acquire (T100, 0x0000))
94 }
95
96 If (Arg2)
97 {
98 CH00 (Arg0, 0x01, 0x01, Acquire (T101, 0xFFFF))
99 }
100
101 If (Arg3)
102 {
103 CH00 (Arg0, 0x01, 0x02, Acquire (T102, 0x8000))
104 }
105
106 If (Arg4)
107 {
108 CH00 (Arg0, 0x01, 0x03, Acquire (T103, 0x1000))
109 }
110 }
111
112 Method (M012, 5, NotSerialized)
113 {
114 If (Arg1)
115 {
116 CH00 (Arg0, 0x02, 0x00, Acquire (T200, 0x0000))
117 }
118
119 If (Arg2)
120 {
121 CH00 (Arg0, 0x02, 0x01, Acquire (T201, 0xFFFF))
122 }
123
124 If (Arg3)
125 {
126 CH00 (Arg0, 0x02, 0x02, Acquire (T202, 0x8000))
127 }
128
129 If (Arg4)
130 {
131 CH00 (Arg0, 0x02, 0x03, Acquire (T203, 0x1000))
132 }
133 }
134
135 Method (M013, 5, NotSerialized)
136 {
137 If (Arg1)
138 {
139 CH00 (Arg0, 0x03, 0x00, Acquire (T300, 0x0000))
140 }
141
142 If (Arg2)
143 {
144 CH00 (Arg0, 0x03, 0x01, Acquire (T301, 0xFFFF))
145 }
146
147 If (Arg3)
148 {
149 CH00 (Arg0, 0x03, 0x02, Acquire (T302, 0x8000))
150 }
151
152 If (Arg4)
153 {
154 CH00 (Arg0, 0x03, 0x03, Acquire (T303, 0x1000))
155 }
156 }
157
158 Method (M014, 5, NotSerialized)
159 {
160 If (Arg1)
161 {
162 CH00 (Arg0, 0x04, 0x00, Acquire (T400, 0x0000))
163 }
164
165 If (Arg2)
166 {
167 CH00 (Arg0, 0x04, 0x01, Acquire (T401, 0xFFFF))
168 }
169
170 If (Arg3)
171 {
172 CH00 (Arg0, 0x04, 0x02, Acquire (T402, 0x8000))
173 }
174
175 If (Arg4)
176 {
177 CH00 (Arg0, 0x04, 0x03, Acquire (T403, 0x1000))
178 }
179 }
180
181 Method (M015, 5, NotSerialized)
182 {
183 If (Arg1)
184 {
185 CH00 (Arg0, 0x05, 0x00, Acquire (T500, 0x0000))
186 }
187
188 If (Arg2)
189 {
190 CH00 (Arg0, 0x05, 0x01, Acquire (T501, 0xFFFF))
191 }
192
193 If (Arg3)
194 {
195 CH00 (Arg0, 0x05, 0x02, Acquire (T502, 0x8000))
196 }
197
198 If (Arg4)
199 {
200 CH00 (Arg0, 0x05, 0x03, Acquire (T503, 0x1000))
201 }
202 }
203
204 Method (M016, 5, NotSerialized)
205 {
206 If (Arg1)
207 {
208 CH00 (Arg0, 0x06, 0x00, Acquire (T600, 0x0000))
209 }
210
211 If (Arg2)
212 {
213 CH00 (Arg0, 0x06, 0x01, Acquire (T601, 0xFFFF))
214 }
215
216 If (Arg3)
217 {
218 CH00 (Arg0, 0x06, 0x02, Acquire (T602, 0x8000))
219 }
220
221 If (Arg4)
222 {
223 CH00 (Arg0, 0x06, 0x03, Acquire (T603, 0x1000))
224 }
225 }
226
227 Method (M017, 5, NotSerialized)
228 {
229 If (Arg1)
230 {
231 CH00 (Arg0, 0x07, 0x00, Acquire (T700, 0x0000))
232 }
233
234 If (Arg2)
235 {
236 CH00 (Arg0, 0x07, 0x01, Acquire (T701, 0xFFFF))
237 }
238
239 If (Arg3)
240 {
241 CH00 (Arg0, 0x07, 0x02, Acquire (T702, 0x8000))
242 }
243
244 If (Arg4)
245 {
246 CH00 (Arg0, 0x07, 0x03, Acquire (T703, 0x1000))
247 }
248 }
249
250 Method (M018, 5, NotSerialized)
251 {
252 If (Arg1)
253 {
254 CH00 (Arg0, 0x08, 0x00, Acquire (T800, 0x0000))
255 }
256
257 If (Arg2)
258 {
259 CH00 (Arg0, 0x08, 0x01, Acquire (T801, 0xFFFF))
260 }
261
262 If (Arg3)
263 {
264 CH00 (Arg0, 0x08, 0x02, Acquire (T802, 0x8000))
265 }
266
267 If (Arg4)
268 {
269 CH00 (Arg0, 0x08, 0x03, Acquire (T803, 0x1000))
270 }
271 }
272
273 Method (M019, 5, NotSerialized)
274 {
275 If (Arg1)
276 {
277 CH00 (Arg0, 0x09, 0x00, Acquire (T900, 0x0000))
278 }
279
280 If (Arg2)
281 {
282 CH00 (Arg0, 0x09, 0x01, Acquire (T901, 0xFFFF))
283 }
284
285 If (Arg3)
286 {
287 CH00 (Arg0, 0x09, 0x02, Acquire (T902, 0x8000))
288 }
289
290 If (Arg4)
291 {
292 CH00 (Arg0, 0x09, 0x03, Acquire (T903, 0x1000))
293 }
294 }
295
296 Method (M01A, 5, NotSerialized)
297 {
298 If (Arg1)
299 {
300 CH00 (Arg0, 0x0A, 0x00, Acquire (TA00, 0x0000))
301 }
302
303 If (Arg2)
304 {
305 CH00 (Arg0, 0x0A, 0x01, Acquire (TA01, 0xFFFF))
306 }
307
308 If (Arg3)
309 {
310 CH00 (Arg0, 0x0A, 0x02, Acquire (TA02, 0x8000))
311 }
312
313 If (Arg4)
314 {
315 CH00 (Arg0, 0x0A, 0x03, Acquire (TA03, 0x1000))
316 }
317 }
318
319 Method (M01B, 5, NotSerialized)
320 {
321 If (Arg1)
322 {
323 CH00 (Arg0, 0x0B, 0x00, Acquire (TB00, 0x0000))
324 }
325
326 If (Arg2)
327 {
328 CH00 (Arg0, 0x0B, 0x01, Acquire (TB01, 0xFFFF))
329 }
330
331 If (Arg3)
332 {
333 CH00 (Arg0, 0x0B, 0x02, Acquire (TB02, 0x8000))
334 }
335
336 If (Arg4)
337 {
338 CH00 (Arg0, 0x0B, 0x03, Acquire (TB03, 0x1000))
339 }
340 }
341
342 Method (M01C, 5, NotSerialized)
343 {
344 If (Arg1)
345 {
346 CH00 (Arg0, 0x0C, 0x00, Acquire (TC00, 0x0000))
347 }
348
349 If (Arg2)
350 {
351 CH00 (Arg0, 0x0C, 0x01, Acquire (TC01, 0xFFFF))
352 }
353
354 If (Arg3)
355 {
356 CH00 (Arg0, 0x0C, 0x02, Acquire (TC02, 0x8000))
357 }
358
359 If (Arg4)
360 {
361 CH00 (Arg0, 0x0C, 0x03, Acquire (TC03, 0x1000))
362 }
363 }
364
365 Method (M01D, 5, NotSerialized)
366 {
367 If (Arg1)
368 {
369 CH00 (Arg0, 0x0D, 0x00, Acquire (TD00, 0x0000))
370 }
371
372 If (Arg2)
373 {
374 CH00 (Arg0, 0x0D, 0x01, Acquire (TD01, 0xFFFF))
375 }
376
377 If (Arg3)
378 {
379 CH00 (Arg0, 0x0D, 0x02, Acquire (TD02, 0x8000))
380 }
381
382 If (Arg4)
383 {
384 CH00 (Arg0, 0x0D, 0x03, Acquire (TD03, 0x1000))
385 }
386 }
387
388 Method (M01E, 5, NotSerialized)
389 {
390 If (Arg1)
391 {
392 CH00 (Arg0, 0x0E, 0x00, Acquire (TE00, 0x0000))
393 }
394
395 If (Arg2)
396 {
397 CH00 (Arg0, 0x0E, 0x01, Acquire (TE01, 0xFFFF))
398 }
399
400 If (Arg3)
401 {
402 CH00 (Arg0, 0x0E, 0x02, Acquire (TE02, 0x8000))
403 }
404
405 If (Arg4)
406 {
407 CH00 (Arg0, 0x0E, 0x03, Acquire (TE03, 0x1000))
408 }
409 }
410
411 Method (M01F, 5, NotSerialized)
412 {
413 If (Arg1)
414 {
415 CH00 (Arg0, 0x0F, 0x00, Acquire (TF00, 0x0000))
416 }
417
418 If (Arg2)
419 {
420 CH00 (Arg0, 0x0F, 0x01, Acquire (TF01, 0xFFFF))
421 }
422
423 If (Arg3)
424 {
425 CH00 (Arg0, 0x0F, 0x02, Acquire (TF02, 0x8000))
426 }
427
428 If (Arg4)
429 {
430 CH00 (Arg0, 0x0F, 0x03, Acquire (TF03, 0x1000))
431 }
432 }
433
434 /* ================================================= Release methods */
435
436 Method (M020, 5, NotSerialized)
437 {
438 If (Arg4)
439 {
440 Release (T003)
441 }
442
443 If (Arg3)
444 {
445 Release (T002)
446 }
447
448 If (Arg2)
449 {
450 Release (T001)
451 }
452
453 If (Arg1)
454 {
455 Release (T000)
456 }
457 }
458
459 Method (M021, 5, NotSerialized)
460 {
461 If (Arg4)
462 {
463 Release (T103)
464 }
465
466 If (Arg3)
467 {
468 Release (T102)
469 }
470
471 If (Arg2)
472 {
473 Release (T101)
474 }
475
476 If (Arg1)
477 {
478 Release (T100)
479 }
480 }
481
482 Method (M022, 5, NotSerialized)
483 {
484 If (Arg4)
485 {
486 Release (T203)
487 }
488
489 If (Arg3)
490 {
491 Release (T202)
492 }
493
494 If (Arg2)
495 {
496 Release (T201)
497 }
498
499 If (Arg1)
500 {
501 Release (T200)
502 }
503 }
504
505 Method (M023, 5, NotSerialized)
506 {
507 If (Arg4)
508 {
509 Release (T303)
510 }
511
512 If (Arg3)
513 {
514 Release (T302)
515 }
516
517 If (Arg2)
518 {
519 Release (T301)
520 }
521
522 If (Arg1)
523 {
524 Release (T300)
525 }
526 }
527
528 Method (M024, 5, NotSerialized)
529 {
530 If (Arg4)
531 {
532 Release (T403)
533 }
534
535 If (Arg3)
536 {
537 Release (T402)
538 }
539
540 If (Arg2)
541 {
542 Release (T401)
543 }
544
545 If (Arg1)
546 {
547 Release (T400)
548 }
549 }
550
551 Method (M025, 5, NotSerialized)
552 {
553 If (Arg4)
554 {
555 Release (T503)
556 }
557
558 If (Arg3)
559 {
560 Release (T502)
561 }
562
563 If (Arg2)
564 {
565 Release (T501)
566 }
567
568 If (Arg1)
569 {
570 Release (T500)
571 }
572 }
573
574 Method (M026, 5, NotSerialized)
575 {
576 If (Arg4)
577 {
578 Release (T603)
579 }
580
581 If (Arg3)
582 {
583 Release (T602)
584 }
585
586 If (Arg2)
587 {
588 Release (T601)
589 }
590
591 If (Arg1)
592 {
593 Release (T600)
594 }
595 }
596
597 Method (M027, 5, NotSerialized)
598 {
599 If (Arg4)
600 {
601 Release (T703)
602 }
603
604 If (Arg3)
605 {
606 Release (T702)
607 }
608
609 If (Arg2)
610 {
611 Release (T701)
612 }
613
614 If (Arg1)
615 {
616 Release (T700)
617 }
618 }
619
620 Method (M028, 5, NotSerialized)
621 {
622 If (Arg4)
623 {
624 Release (T803)
625 }
626
627 If (Arg3)
628 {
629 Release (T802)
630 }
631
632 If (Arg2)
633 {
634 Release (T801)
635 }
636
637 If (Arg1)
638 {
639 Release (T800)
640 }
641 }
642
643 Method (M029, 5, NotSerialized)
644 {
645 If (Arg4)
646 {
647 Release (T903)
648 }
649
650 If (Arg3)
651 {
652 Release (T902)
653 }
654
655 If (Arg2)
656 {
657 Release (T901)
658 }
659
660 If (Arg1)
661 {
662 Release (T900)
663 }
664 }
665
666 Method (M02A, 5, NotSerialized)
667 {
668 If (Arg4)
669 {
670 Release (TA03)
671 }
672
673 If (Arg3)
674 {
675 Release (TA02)
676 }
677
678 If (Arg2)
679 {
680 Release (TA01)
681 }
682
683 If (Arg1)
684 {
685 Release (TA00)
686 }
687 }
688
689 Method (M02B, 5, NotSerialized)
690 {
691 If (Arg4)
692 {
693 Release (TB03)
694 }
695
696 If (Arg3)
697 {
698 Release (TB02)
699 }
700
701 If (Arg2)
702 {
703 Release (TB01)
704 }
705
706 If (Arg1)
707 {
708 Release (TB00)
709 }
710 }
711
712 Method (M02C, 5, NotSerialized)
713 {
714 If (Arg4)
715 {
716 Release (TC03)
717 }
718
719 If (Arg3)
720 {
721 Release (TC02)
722 }
723
724 If (Arg2)
725 {
726 Release (TC01)
727 }
728
729 If (Arg1)
730 {
731 Release (TC00)
732 }
733 }
734
735 Method (M02D, 5, NotSerialized)
736 {
737 If (Arg4)
738 {
739 Release (TD03)
740 }
741
742 If (Arg3)
743 {
744 Release (TD02)
745 }
746
747 If (Arg2)
748 {
749 Release (TD01)
750 }
751
752 If (Arg1)
753 {
754 Release (TD00)
755 }
756 }
757
758 Method (M02E, 5, NotSerialized)
759 {
760 If (Arg4)
761 {
762 Release (TE03)
763 }
764
765 If (Arg3)
766 {
767 Release (TE02)
768 }
769
770 If (Arg2)
771 {
772 Release (TE01)
773 }
774
775 If (Arg1)
776 {
777 Release (TE00)
778 }
779 }
780
781 Method (M02F, 5, NotSerialized)
782 {
783 If (Arg4)
784 {
785 Release (TF03)
786 }
787
788 If (Arg3)
789 {
790 Release (TF02)
791 }
792
793 If (Arg2)
794 {
795 Release (TF01)
796 }
797
798 If (Arg1)
799 {
800 Release (TF00)
801 }
802 }
803
804 /* ================================================= Run Acquire/Release */
805 /*
806 * Acquire
807 * arg0 - name of method to be reported
808 * arg1 - synclevel (0-15)
809 * arg2 - start mutex inside the first processed synclevel
810 * (0 for other levels)
811 * 0 - starting with the # (arg3)
812 * 1 - 0-th
813 * 2 - 1-th
814 * 3 - 2-th
815 * 4 - 3-th
816 * arg3 - # operations to be performed for current synclevel
817 */
818 Method (M030, 4, NotSerialized)
819 {
820 If ((Arg3 == 0x00))
821 {
822 Return (0x00)
823 }
824
825 Local1 = 0x00
826 Local2 = 0x00
827 Local3 = 0x00
828 Local4 = 0x00
829 /* Local5 - index of highest */
830
831 Store ((Arg2 + Arg3), Local5)
832 Local5--
833 Local6 = 0x00
834 Local7 = 0x00
835 If ((Arg2 <= 0x00))
836 {
837 Local6 = 0x01
838 }
839
840 If ((Local5 >= 0x00))
841 {
842 Local7 = 0x01
843 }
844
845 If ((Local6 && Local7))
846 {
847 Local1 = 0x01
848 }
849
850 Local6 = 0x00
851 Local7 = 0x00
852 If ((Arg2 <= 0x01))
853 {
854 Local6 = 0x01
855 }
856
857 If ((Local5 >= 0x01))
858 {
859 Local7 = 0x01
860 }
861
862 If ((Local6 && Local7))
863 {
864 Local2 = 0x01
865 }
866
867 Local6 = 0x00
868 Local7 = 0x00
869 If ((Arg2 <= 0x02))
870 {
871 Local6 = 0x01
872 }
873
874 If ((Local5 >= 0x02))
875 {
876 Local7 = 0x01
877 }
878
879 If ((Local6 && Local7))
880 {
881 Local3 = 0x01
882 }
883
884 Local6 = 0x00
885 Local7 = 0x00
886 If ((Arg2 <= 0x03))
887 {
888 Local6 = 0x01
889 }
890
891 If ((Local5 >= 0x03))
892 {
893 Local7 = 0x01
894 }
895
896 If ((Local6 && Local7))
897 {
898 Local4 = 0x01
899 }
900
901 If (0x00)
902 {
903 Debug = Local1
904 Debug = Local2
905 Debug = Local3
906 Debug = Local4
907 Return (0x00)
908 }
909
910 If ((Arg1 == 0x00))
911 {
912 M010 (Arg0, Local1, Local2, Local3, Local4)
913 }
914
915 If ((Arg1 == 0x01))
916 {
917 M011 (Arg0, Local1, Local2, Local3, Local4)
918 }
919
920 If ((Arg1 == 0x02))
921 {
922 M012 (Arg0, Local1, Local2, Local3, Local4)
923 }
924
925 If ((Arg1 == 0x03))
926 {
927 M013 (Arg0, Local1, Local2, Local3, Local4)
928 }
929
930 If ((Arg1 == 0x04))
931 {
932 M014 (Arg0, Local1, Local2, Local3, Local4)
933 }
934
935 If ((Arg1 == 0x05))
936 {
937 M015 (Arg0, Local1, Local2, Local3, Local4)
938 }
939
940 If ((Arg1 == 0x06))
941 {
942 M016 (Arg0, Local1, Local2, Local3, Local4)
943 }
944
945 If ((Arg1 == 0x07))
946 {
947 M017 (Arg0, Local1, Local2, Local3, Local4)
948 }
949
950 If ((Arg1 == 0x08))
951 {
952 M018 (Arg0, Local1, Local2, Local3, Local4)
953 }
954
955 If ((Arg1 == 0x09))
956 {
957 M019 (Arg0, Local1, Local2, Local3, Local4)
958 }
959
960 If ((Arg1 == 0x0A))
961 {
962 M01A (Arg0, Local1, Local2, Local3, Local4)
963 }
964
965 If ((Arg1 == 0x0B))
966 {
967 M01B (Arg0, Local1, Local2, Local3, Local4)
968 }
969
970 If ((Arg1 == 0x0C))
971 {
972 M01C (Arg0, Local1, Local2, Local3, Local4)
973 }
974
975 If ((Arg1 == 0x0D))
976 {
977 M01D (Arg0, Local1, Local2, Local3, Local4)
978 }
979
980 If ((Arg1 == 0x0E))
981 {
982 M01E (Arg0, Local1, Local2, Local3, Local4)
983 }
984
985 If ((Arg1 == 0x0F))
986 {
987 M01F (Arg0, Local1, Local2, Local3, Local4)
988 }
989
990 Return (0x00)
991 }
992
993 /*
994 * Release
995 * arg0 - name of method to be reported
996 * arg1 - synclevel (0-15)
997 * arg2 - start mutex inside the first processed synclevel
998 * (0 for other levels)
999 * 0 - starting with the # (arg3)
1000 * 4 - 3-th
1001 * 3 - 2-th
1002 * 2 - 1-th
1003 * 1 - 0-th
1004 * arg3 - # operations to be performed for current synclevel
1005 */
1006 Method (M031, 4, NotSerialized)
1007 {
1008 If ((Arg3 == 0x00))
1009 {
1010 Return (0x00)
1011 }
1012
1013 Local1 = 0x00
1014 Local2 = 0x00
1015 Local3 = 0x00
1016 Local4 = 0x00
1017 /* arg2 - index of highest */
1018
1019 If ((Arg2 == 0x00))
1020 {
1021 Arg2 = Arg3
1022 }
1023
1024 Arg2--
1025 /* Local5 - index of lowest */
1026
1027 Store ((Arg2 - Arg3), Local5)
1028 Local5++
1029 Local6 = 0x00
1030 Local7 = 0x00
1031 If ((Local5 <= 0x00))
1032 {
1033 Local6 = 0x01
1034 }
1035
1036 If ((Arg2 >= 0x00))
1037 {
1038 Local7 = 0x01
1039 }
1040
1041 If ((Local6 && Local7))
1042 {
1043 Local1 = 0x01
1044 }
1045
1046 Local6 = 0x00
1047 Local7 = 0x00
1048 If ((Local5 <= 0x01))
1049 {
1050 Local6 = 0x01
1051 }
1052
1053 If ((Arg2 >= 0x01))
1054 {
1055 Local7 = 0x01
1056 }
1057
1058 If ((Local6 && Local7))
1059 {
1060 Local2 = 0x01
1061 }
1062
1063 Local6 = 0x00
1064 Local7 = 0x00
1065 If ((Local5 <= 0x02))
1066 {
1067 Local6 = 0x01
1068 }
1069
1070 If ((Arg2 >= 0x02))
1071 {
1072 Local7 = 0x01
1073 }
1074
1075 If ((Local6 && Local7))
1076 {
1077 Local3 = 0x01
1078 }
1079
1080 Local6 = 0x00
1081 Local7 = 0x00
1082 If ((Local5 <= 0x03))
1083 {
1084 Local6 = 0x01
1085 }
1086
1087 If ((Arg2 >= 0x03))
1088 {
1089 Local7 = 0x01
1090 }
1091
1092 If ((Local6 && Local7))
1093 {
1094 Local4 = 0x01
1095 }
1096
1097 If (0x00)
1098 {
1099 Debug = Local1
1100 Debug = Local2
1101 Debug = Local3
1102 Debug = Local4
1103 Return (0x00)
1104 }
1105
1106 If ((Arg1 == 0x00))
1107 {
1108 M020 (Arg0, Local1, Local2, Local3, Local4)
1109 }
1110
1111 If ((Arg1 == 0x01))
1112 {
1113 M021 (Arg0, Local1, Local2, Local3, Local4)
1114 }
1115
1116 If ((Arg1 == 0x02))
1117 {
1118 M022 (Arg0, Local1, Local2, Local3, Local4)
1119 }
1120
1121 If ((Arg1 == 0x03))
1122 {
1123 M023 (Arg0, Local1, Local2, Local3, Local4)
1124 }
1125
1126 If ((Arg1 == 0x04))
1127 {
1128 M024 (Arg0, Local1, Local2, Local3, Local4)
1129 }
1130
1131 If ((Arg1 == 0x05))
1132 {
1133 M025 (Arg0, Local1, Local2, Local3, Local4)
1134 }
1135
1136 If ((Arg1 == 0x06))
1137 {
1138 M026 (Arg0, Local1, Local2, Local3, Local4)
1139 }
1140
1141 If ((Arg1 == 0x07))
1142 {
1143 M027 (Arg0, Local1, Local2, Local3, Local4)
1144 }
1145
1146 If ((Arg1 == 0x08))
1147 {
1148 M028 (Arg0, Local1, Local2, Local3, Local4)
1149 }
1150
1151 If ((Arg1 == 0x09))
1152 {
1153 M029 (Arg0, Local1, Local2, Local3, Local4)
1154 }
1155
1156 If ((Arg1 == 0x0A))
1157 {
1158 M02A (Arg0, Local1, Local2, Local3, Local4)
1159 }
1160
1161 If ((Arg1 == 0x0B))
1162 {
1163 M02B (Arg0, Local1, Local2, Local3, Local4)
1164 }
1165
1166 If ((Arg1 == 0x0C))
1167 {
1168 M02C (Arg0, Local1, Local2, Local3, Local4)
1169 }
1170
1171 If ((Arg1 == 0x0D))
1172 {
1173 M02D (Arg0, Local1, Local2, Local3, Local4)
1174 }
1175
1176 If ((Arg1 == 0x0E))
1177 {
1178 M02E (Arg0, Local1, Local2, Local3, Local4)
1179 }
1180
1181 If ((Arg1 == 0x0F))
1182 {
1183 M02F (Arg0, Local1, Local2, Local3, Local4)
1184 }
1185
1186 Return (0x00)
1187 }
1188
1189 /* ================================================= Tests */
1190 /* How many times run Acquire/Release for the particular level mutexes */
1191 /* 0 - Acquire */
1192 /* 1 - Release */
1193 /*
1194 * Name(p010, Buffer() {
1195 * 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1196 * 1, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1197 * 0, 0, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1198 * 1, 0, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1199 * }
1200 * )
1201 */
1202 Name (P010, Buffer (0x03F0)
1203 {
1204 /* 0000 */ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1205 /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1206 /* 0010 */ 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, // ........
1207 /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1208 /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, // ........
1209 /* 0028 */ 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, // ........
1210 /* 0030 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1211 /* 0038 */ 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, // ........
1212 /* 0040 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1213 /* 0048 */ 0x00, 0x00, 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, // ........
1214 /* 0050 */ 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, // ........
1215 /* 0058 */ 0x02, 0x00, 0x01, 0x00, 0x04, 0x03, 0x02, 0x01, // ........
1216 /* 0060 */ 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, // ........
1217 /* 0068 */ 0x04, 0x03, 0x02, 0x00, 0x00, 0x00, 0x04, 0x04, // ........
1218 /* 0070 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1219 /* 0078 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x01, 0x00, // ........
1220 /* 0080 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1221 /* 0088 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1222 /* 0090 */ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1223 /* 0098 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1224 /* 00A0 */ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ........
1225 /* 00A8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1226 /* 00B0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ........
1227 /* 00B8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1228 /* 00C0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1229 /* 00C8 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1230 /* 00D0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1231 /* 00D8 */ 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1232 /* 00E0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1233 /* 00E8 */ 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, // ........
1234 /* 00F0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1235 /* 00F8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, // ........
1236 /* 0100 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, // ........
1237 /* 0108 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1238 /* 0110 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1239 /* 0118 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1240 /* 0120 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1241 /* 0128 */ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1242 /* 0130 */ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1243 /* 0138 */ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ........
1244 /* 0140 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........
1245 /* 0148 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ........
1246 /* 0150 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1247 /* 0158 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1248 /* 0160 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1249 /* 0168 */ 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1250 /* 0170 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1251 /* 0178 */ 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1252 /* 0180 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1253 /* 0188 */ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ........
1254 /* 0190 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1255 /* 0198 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, // ........
1256 /* 01A0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1257 /* 01A8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ........
1258 /* 01B0 */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1259 /* 01B8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1260 /* 01C0 */ 0x00, 0x04, 0x01, 0x00, 0x04, 0x04, 0x04, 0x04, // ........
1261 /* 01C8 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1262 /* 01D0 */ 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, // ........
1263 /* 01D8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1264 /* 01E0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, // ........
1265 /* 01E8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1266 /* 01F0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ........
1267 /* 01F8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1268 /* 0200 */ 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1269 /* 0208 */ 0x04, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1270 /* 0210 */ 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1271 /* 0218 */ 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00, // ........
1272 /* 0220 */ 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, // ........
1273 /* 0228 */ 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0x00, // ........
1274 /* 0230 */ 0x04, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........
1275 /* 0238 */ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, // ........
1276 /* 0240 */ 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1277 /* 0248 */ 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1278 /* 0250 */ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1279 /* 0258 */ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ........
1280 /* 0260 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1281 /* 0268 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ........
1282 /* 0270 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1283 /* 0278 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1284 /* 0280 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1285 /* 0288 */ 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1286 /* 0290 */ 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1287 /* 0298 */ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1288 /* 02A0 */ 0x00, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, // ........
1289 /* 02A8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1290 /* 02B0 */ 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x00, // ........
1291 /* 02B8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1292 /* 02C0 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1293 /* 02C8 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1294 /* 02D0 */ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1295 /* 02D8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1296 /* 02E0 */ 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, // ........
1297 /* 02E8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1298 /* 02F0 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x01, 0x00, // ........
1299 /* 02F8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1300 /* 0300 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, // ........
1301 /* 0308 */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1302 /* 0310 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1303 /* 0318 */ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1304 /* 0320 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1305 /* 0328 */ 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, // ........
1306 /* 0330 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, // ........
1307 /* 0338 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........
1308 /* 0340 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, // ........
1309 /* 0348 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, // ........
1310 /* 0350 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ........
1311 /* 0358 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1312 /* 0360 */ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1313 /* 0368 */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1314 /* 0370 */ 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x04, 0x04, // ........
1315 /* 0378 */ 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1316 /* 0380 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, // ........
1317 /* 0388 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, // ........
1318 /* 0390 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ........
1319 /* 0398 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, // ........
1320 /* 03A0 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1321 /* 03A8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ........
1322 /* 03B0 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, // ........
1323 /* 03B8 */ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1324 /* 03C0 */ 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1325 /* 03C8 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
1326 /* 03D0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, // ........
1327 /* 03D8 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x01, 0x00, // ........
1328 /* 03E0 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // ........
1329 /* 03E8 */ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 // ........
1330 })
1331 /*
1332 * Run Acquire/Release for all level mutexes
1333 *
1334 * Buffer:={N lines}
1335 * Line:= consists of 18 bytes:
1336 * 0: operation: 0-Acquire, 1-Release
1337 * 1: The start mutex inside the first processed synclevel
1338 * (start mux and synclevels are ordered: Acquire: left->r,
1339 * Release: r->l)
1340 * 0: to start according to the given number (bytes 2-17)
1341 * 1-4: Acquire (left->right) (1-0th,2-1th,3-2th,4-3th)
1342 * Release (right->left) (4-3th,3-2th,2-1th,1-0th)
1343 * 2-17: per-synclevel numbers of operations to be performed:
1344 * how many operations (from 0 up to 4) to be performed
1345 * (at most one per mutex) on the mutexes of the relevant
1346 * level (2th - synclevel 0, 3th - synclevel 1, etc.)
1347 * Variables:
1348 * arg0 - name of method to be reported
1349 * arg1 - lines total number
1350 * arg2 - buffer of lines
1351 * arg3 - name of buffer
1352 * Local7 - index of line
1353 * Local6 - synclevel (0-15)
1354 * Local5 - operation (0-Acquire,1-Release)
1355 * Local4 - abs index corresponding to synclevel inside the buffer
1356 * Local3 - auxiliary = (Local6 + 1)
1357 * Local2 - # operations to be performed for current synclevel
1358 * Local1 - start mutex inside the first processed synclevel
1359 * (0 for other levels)
1360 */
1361 Method (M032, 4, NotSerialized)
1362 {
1363 Local7 = 0x00
1364 While (Arg1)
1365 {
1366 Local6 = (Local7 * 0x12)
1367 Local5 = DerefOf (Arg2 [Local6])
1368 Local6++
1369 Local1 = DerefOf (Arg2 [Local6])
1370 If ((Local5 == 0x00))
1371 {
1372 If (0x00)
1373 {
1374 Debug = "============= Acq"
1375 }
1376
1377 Store ((Local6 + 0x01), Local4)
1378 Local6 = 0x00
1379 While ((Local6 < 0x10))
1380 {
1381 Local2 = DerefOf (Arg2 [Local4])
1382 If (0x00)
1383 {
1384 Debug = Local6
1385 Debug = Local4
1386 Debug = Local2
1387 }
1388
1389 If (Local2)
1390 {
1391 M030 (Arg0, Local6, Local1, Local2)
1392 Local1 = 0x00
1393 }
1394
1395 Local6++
1396 Local4++
1397 }
1398 }
1399 Else
1400 {
1401 If (0x00)
1402 {
1403 Debug = "============= Rel"
1404 }
1405
1406 Store ((Local6 + 0x10), Local4)
1407 Local3 = 0x10
1408 While (Local3)
1409 {
1410 Store ((Local3 - 0x01), Local6)
1411 Local2 = DerefOf (Arg2 [Local4])
1412 If (0x00)
1413 {
1414 Debug = Local6
1415 Debug = Local4
1416 Debug = Local2
1417 }
1418
1419 If (Local2)
1420 {
1421 M031 (Arg0, Local6, Local1, Local2)
1422 Local1 = 0x00
1423 }
1424
1425 Local3--
1426 Local4--
1427 }
1428 }
1429
1430 Local7++
1431 Arg1--
1432 }
1433
1434 CH03 ("MUX0", Z150, __LINE__, 0x00, 0x00)
1435 }
1436
1437 Method (M033, 0, Serialized)
1438 {
1439 Mutex (MTX0, 0x00)
1440 Local0 = Acquire (MTX0, 0x0000)
1441 If (Local0)
1442 {
1443 Debug = "M033: Could not acquire mutex"
1444 Return (Zero)
1445 }
1446
1447 Release (MTX0)
1448 }
1449
1450 Method (M034, 0, NotSerialized)
1451 {
1452 Local0 = 0xC8
1453 While (Local0)
1454 {
1455 M033 ()
1456 Local0--
1457 }
1458 }
1459
1460 /* Run-method */
1461
1462 Method (MUX0, 0, Serialized)
1463 {
1464 Debug = "TEST: MUX0, Acquire/Release Mutex"
1465 SRMT ("m032")
1466 M032 (__METHOD__, 0x38, P010, "p010")
1467 SRMT ("m034")
1468 M034 ()
1469 }