diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 16:09:47 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 16:09:47 +0000 |
commit | f1919bc08041d359d38f4810bcf2437618418699 (patch) | |
tree | b294124ef4da82ad9b0a331f660f48f02e52d779 /gcc/ada/s-tasdeb.adb | |
parent | ff540fb068b6274bd0b1c88cccf01b1cfdd19ef6 (diff) | |
download | gcc-f1919bc08041d359d38f4810bcf2437618418699.tar.gz |
* 5zosinte.ads (null_pthread): new constant.
* 5ztaprop.adb:
(Initialize_TCB): Initialize thread ID to null, to be able to verify
later that this field has been set.
(Finalize_TCB): ditto.
(Suspend_Task): Verify that the thread ID is not null before using it.
(Resume_Task): ditto.
* s-tasdeb.adb:
(Resume_All_Tasks): Lock the tasks list before using it.
(Suspend_All_Tasks): ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46548 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tasdeb.adb')
-rw-r--r-- | gcc/ada/s-tasdeb.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/s-tasdeb.adb b/gcc/ada/s-tasdeb.adb index 83e2efcc645..4ee2fd45a80 100644 --- a/gcc/ada/s-tasdeb.adb +++ b/gcc/ada/s-tasdeb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.23 $ +-- $Revision$ -- -- -- Copyright (C) 1997-2001 Free Software Foundation, Inc. -- -- -- @@ -499,12 +499,15 @@ package body System.Tasking.Debug is R : Boolean; begin + STPO.Lock_All_Tasks_List; C := All_Tasks_List; while C /= null loop R := STPO.Resume_Task (C, Thread_Self); C := C.Common.All_Tasks_Link; end loop; + + STPO.Unlock_All_Tasks_List; end Resume_All_Tasks; ---------- @@ -577,12 +580,15 @@ package body System.Tasking.Debug is R : Boolean; begin + STPO.Lock_All_Tasks_List; C := All_Tasks_List; while C /= null loop R := STPO.Suspend_Task (C, Thread_Self); C := C.Common.All_Tasks_Link; end loop; + + STPO.Unlock_All_Tasks_List; end Suspend_All_Tasks; ------------------------ |