summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop.ads
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.ads
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.ads')
-rw-r--r--gcc/ada/s-taprop.ads11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/s-taprop.ads b/gcc/ada/s-taprop.ads
index 12fbd71386e..a25c8bf979e 100644
--- a/gcc/ada/s-taprop.ads
+++ b/gcc/ada/s-taprop.ads
@@ -149,6 +149,9 @@ package System.Task_Primitives.Operations is
(Prio : System.Any_Priority;
L : not null access Lock);
procedure Initialize_Lock
+ (Prio : System.Any_Priority;
+ L : not null access RW_Lock);
+ procedure Initialize_Lock
(L : not null access RTS_Lock;
Level : Lock_Level);
pragma Inline (Initialize_Lock);
@@ -173,6 +176,7 @@ package System.Task_Primitives.Operations is
-- These operations raise Storage_Error if a lack of storage is detected
procedure Finalize_Lock (L : not null access Lock);
+ procedure Finalize_Lock (L : not null access RW_Lock);
procedure Finalize_Lock (L : not null access RTS_Lock);
pragma Inline (Finalize_Lock);
-- Finalize a lock object, freeing any resources allocated by the
@@ -182,6 +186,9 @@ package System.Task_Primitives.Operations is
(L : not null access Lock;
Ceiling_Violation : out Boolean);
procedure Write_Lock
+ (L : not null access RW_Lock;
+ Ceiling_Violation : out Boolean);
+ procedure Write_Lock
(L : not null access RTS_Lock;
Global_Lock : Boolean := False);
procedure Write_Lock
@@ -210,7 +217,7 @@ package System.Task_Primitives.Operations is
-- per-task lock is implicit in Exit_Task.
procedure Read_Lock
- (L : not null access Lock;
+ (L : not null access RW_Lock;
Ceiling_Violation : out Boolean);
pragma Inline (Read_Lock);
-- Lock a lock object for read access. After this operation returns,
@@ -236,6 +243,8 @@ package System.Task_Primitives.Operations is
procedure Unlock
(L : not null access Lock);
procedure Unlock
+ (L : not null access RW_Lock);
+ procedure Unlock
(L : not null access RTS_Lock;
Global_Lock : Boolean := False);
procedure Unlock