diff options
Diffstat (limited to 'gcc/ada/5ginterr.adb')
-rw-r--r-- | gcc/ada/5ginterr.adb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ada/5ginterr.adb b/gcc/ada/5ginterr.adb index c4db14c98a7..4b7d1a30a1b 100644 --- a/gcc/ada/5ginterr.adb +++ b/gcc/ada/5ginterr.adb @@ -6,9 +6,9 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.13 $ +-- $Revision$ -- -- --- Copyright (C) 1998-1999 Free Software Fundation -- +-- Copyright (C) 1998-2001 Free Software Fundation -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,7 @@ -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. It is -- --- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- --- State University (http://www.gnat.com). -- +-- now maintained by Ada Core Technologies, Inc. (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ @@ -68,6 +67,9 @@ with System.Tasking.Initialization; with System.Interrupt_Management; +with System.Parameters; +-- used for Single_Lock + with Interfaces.C; -- used for int @@ -75,6 +77,7 @@ with Unchecked_Conversion; package body System.Interrupts is + use Parameters; use Tasking; use Ada.Exceptions; use System.OS_Interface; @@ -650,11 +653,21 @@ package body System.Interrupts is end loop; Initialization.Defer_Abort (Self_Id); + + if Single_Lock then + STPO.Lock_RTS; + end if; + STPO.Write_Lock (Self_Id); Self_Id.Common.State := Interrupt_Server_Idle_Sleep; STPO.Sleep (Self_Id, Interrupt_Server_Idle_Sleep); Self_Id.Common.State := Runnable; STPO.Unlock (Self_Id); + + if Single_Lock then + STPO.Unlock_RTS; + end if; + Initialization.Undefer_Abort (Self_Id); -- Undefer abort here to allow a window for this task |