Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnarl/s-interr.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- -- |
543 -- Is_Registered -- | 543 -- Is_Registered -- |
544 ------------------- | 544 ------------------- |
545 | 545 |
546 function Is_Registered (Handler : Parameterless_Handler) return Boolean is | 546 function Is_Registered (Handler : Parameterless_Handler) return Boolean is |
547 | 547 |
548 type Acc_Proc is access procedure; | |
549 | |
548 type Fat_Ptr is record | 550 type Fat_Ptr is record |
549 Object_Addr : System.Address; | 551 Object_Addr : System.Address; |
550 Handler_Addr : System.Address; | 552 Handler_Addr : Acc_Proc; |
551 end record; | 553 end record; |
552 | 554 |
553 function To_Fat_Ptr is new Ada.Unchecked_Conversion | 555 function To_Fat_Ptr is new Ada.Unchecked_Conversion |
554 (Parameterless_Handler, Fat_Ptr); | 556 (Parameterless_Handler, Fat_Ptr); |
555 | 557 |
563 | 565 |
564 Fat := To_Fat_Ptr (Handler); | 566 Fat := To_Fat_Ptr (Handler); |
565 | 567 |
566 Ptr := Registered_Handler_Head; | 568 Ptr := Registered_Handler_Head; |
567 while Ptr /= null loop | 569 while Ptr /= null loop |
568 if Ptr.H = Fat.Handler_Addr then | 570 if Ptr.H = Fat.Handler_Addr.all'Address then |
569 return True; | 571 return True; |
570 end if; | 572 end if; |
571 | 573 |
572 Ptr := Ptr.Next; | 574 Ptr := Ptr.Next; |
573 end loop; | 575 end loop; |