Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnarl/s-interr__vxworks.adb @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 -- -- | 4 -- -- |
5 -- S Y S T E M . I N T E R R U P T S -- | 5 -- S Y S T E M . I N T E R R U P T S -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNARL is free software; you can redistribute it and/or modify it under -- | 11 -- GNARL is free software; you can redistribute it and/or modify it under -- |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
576 ------------------- | 576 ------------------- |
577 -- Is_Registered -- | 577 -- Is_Registered -- |
578 ------------------- | 578 ------------------- |
579 | 579 |
580 function Is_Registered (Handler : Parameterless_Handler) return Boolean is | 580 function Is_Registered (Handler : Parameterless_Handler) return Boolean is |
581 | |
582 type Acc_Proc is access procedure; | |
583 | |
581 type Fat_Ptr is record | 584 type Fat_Ptr is record |
582 Object_Addr : System.Address; | 585 Object_Addr : System.Address; |
583 Handler_Addr : System.Address; | 586 Handler_Addr : Acc_Proc; |
584 end record; | 587 end record; |
585 | 588 |
586 function To_Fat_Ptr is new Ada.Unchecked_Conversion | 589 function To_Fat_Ptr is new Ada.Unchecked_Conversion |
587 (Parameterless_Handler, Fat_Ptr); | 590 (Parameterless_Handler, Fat_Ptr); |
588 | 591 |
596 | 599 |
597 Fat := To_Fat_Ptr (Handler); | 600 Fat := To_Fat_Ptr (Handler); |
598 | 601 |
599 Ptr := Registered_Handler_Head; | 602 Ptr := Registered_Handler_Head; |
600 while Ptr /= null loop | 603 while Ptr /= null loop |
601 if Ptr.H = Fat.Handler_Addr then | 604 if Ptr.H = Fat.Handler_Addr.all'Address then |
602 return True; | 605 return True; |
603 end if; | 606 end if; |
604 | 607 |
605 Ptr := Ptr.Next; | 608 Ptr := Ptr.Next; |
606 end loop; | 609 end loop; |