summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-mingw.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:33:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:33:30 +0000
commitc5bd783914e5754e51e35348838500f5e85f30c7 (patch)
treeeedc8f468a523f0beb2b503bbe92a69881b03282 /gcc/ada/s-taprop-mingw.adb
parentd8e0897657312c7d0ff112d72297ed98a45a9229 (diff)
downloadgcc-c5bd783914e5754e51e35348838500f5e85f30c7.tar.gz
2011-09-27 Pascal Obry <obry@adacore.com>
* s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock. (Finalize_Lock)[RW_Lock]: Likewise. (Write_Lock)[RW_Lock]: Likewise. (Unlock)[RW_Lock]: Likewise. (Read_Lock): Define L as RW_Lock (instead of Lock). * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New routine for r/w lock. (Finalize_Lock)[RW_Lock]: Likewise. (Write_Lock)[RW_Lock]: Likewise. (Unlock)[RW_Lock]: Likewise. (Read_Lock): Define L as RW_Lock (instead of Lock). * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb (Initialize_Lock)[RW_Lock]: Same implementation as corresponding routine for standard lock. (Finalize_Lock)[RW_Lock]: Likewise. (Write_Lock)[RW_Lock]: Likewise. (Unlock)[RW_Lock]: Likewise. (Read_Lock): Define L as RW_Lock (instead of Lock). * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock) in the record definition. * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w lock for 'R' locking policy. (Initialize_Protection): Likewise. (Lock): Likewise. (Lock_Read_Only): Likewise. (Unlock): Likewise. * s-taspri-posix.ads (RW_Lock): New type defined as OS_Interface.pthread_rwlock_t. * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads, s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads, s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads, s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-mingw.adb')
-rw-r--r--gcc/ada/s-taprop-mingw.adb26
1 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ada/s-taprop-mingw.adb b/gcc/ada/s-taprop-mingw.adb
index 7fc505e30bc..2b5ca16aaa8 100644
--- a/gcc/ada/s-taprop-mingw.adb
+++ b/gcc/ada/s-taprop-mingw.adb
@@ -415,6 +415,14 @@ package body System.Task_Primitives.Operations is
end Initialize_Lock;
procedure Initialize_Lock
+ (Prio : System.Any_Priority;
+ L : not null access RW_Lock)
+ is
+ begin
+ Initialize_Lock (Prio, Lock (L.all)'Unrestricted_Access);
+ end Initialize_Lock;
+
+ procedure Initialize_Lock
(L : not null access RTS_Lock; Level : Lock_Level)
is
pragma Unreferenced (Level);
@@ -431,6 +439,11 @@ package body System.Task_Primitives.Operations is
DeleteCriticalSection (L.Mutex'Access);
end Finalize_Lock;
+ procedure Finalize_Lock (L : not null access RW_Lock) is
+ begin
+ Finalize_Lock (Lock (L.all)'Unrestricted_Access);
+ end Finalize_Lock;
+
procedure Finalize_Lock (L : not null access RTS_Lock) is
begin
DeleteCriticalSection (L);
@@ -456,6 +469,12 @@ package body System.Task_Primitives.Operations is
end Write_Lock;
procedure Write_Lock
+ (L : not null access RW_Lock; Ceiling_Violation : out Boolean) is
+ begin
+ Write_Lock (Lock (L.all)'Unrestricted_Access, Ceiling_Violation);
+ end Write_Lock;
+
+ procedure Write_Lock
(L : not null access RTS_Lock;
Global_Lock : Boolean := False)
is
@@ -477,7 +496,7 @@ package body System.Task_Primitives.Operations is
---------------
procedure Read_Lock
- (L : not null access Lock; Ceiling_Violation : out Boolean) is
+ (L : not null access RW_Lock; Ceiling_Violation : out Boolean) is
begin
Write_Lock (L, Ceiling_Violation);
end Read_Lock;
@@ -491,6 +510,11 @@ package body System.Task_Primitives.Operations is
LeaveCriticalSection (L.Mutex'Access);
end Unlock;
+ procedure Unlock (L : not null access RW_Lock) is
+ begin
+ Unlock (Lock (L.all)'Unrestricted_Access);
+ end Unlock;
+
procedure Unlock
(L : not null access RTS_Lock; Global_Lock : Boolean := False) is
begin