summaryrefslogtreecommitdiff
path: root/gcc/ada/s-atopri.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-06 08:12:10 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-06 08:12:10 +0000
commit958b0dc0510c358e6cd887dfc895bc5883ab42bf (patch)
treef0cc8703a3dd5b12c3179ab47811052a3e29feef /gcc/ada/s-atopri.adb
parenta39ff5829e67c254be33ea807e2e8217f01c1fba (diff)
downloadgcc-958b0dc0510c358e6cd887dfc895bc5883ab42bf.tar.gz
2012-08-06 Vincent Pucci <pucci@adacore.com>
PR ada/54125 * exp_attr.adb (Expand_N_Attribute_Reference): Expand new Atomic_Always_Lock_Free attribute. * sem_attr.adb (Analyze_Attribute): Analyze new Atomic_Always_Lock_Free attribute. (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free attribute. * sem_ch9.adb (Allows_Lock_Free_Implementation): Support_Atomic_Primitives check replaces previous erroneous size check. * sem_util.adb, sem_util.ads (Support_Atomic_Primitives): New routine. * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and new attribute Attribute_Atomic_Always_Lock_Free defined. * s-atopri.adb: Support_Atomic_Primitives checks replaced by Atomic_Always_Lock_Free queries. * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads, system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads, system-linux-ppc.ads, system-linux-s390.ads, system-linux-s390x.ads, system-linux-sh4.ads, system-linux-sparc.ads, system-lynxos178-ppc.ads, system-lynxos-ppc.ads, system-mingw.ads, system-vxworks-arm.ads, system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms_64.ads, system-vxworks-m68k.ads, system-vxworks-mips.ads, system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag Support_Atomic_Primitives removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-atopri.adb')
-rw-r--r--gcc/ada/s-atopri.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/s-atopri.adb b/gcc/ada/s-atopri.adb
index 50e7346f80e..145cbb6c9db 100644
--- a/gcc/ada/s-atopri.adb
+++ b/gcc/ada/s-atopri.adb
@@ -37,7 +37,7 @@ package body System.Atomic_Primitives is
function Lock_Free_Read_8 (Ptr : Address) return uint8 is
begin
- if Support_Atomic_Primitives then
+ if uint8'Atomic_Always_Lock_Free then
return Atomic_Load_8 (Ptr, Acquire);
else
raise Program_Error;
@@ -50,7 +50,7 @@ package body System.Atomic_Primitives is
function Lock_Free_Read_16 (Ptr : Address) return uint16 is
begin
- if Support_Atomic_Primitives then
+ if uint16'Atomic_Always_Lock_Free then
return Atomic_Load_16 (Ptr, Acquire);
else
raise Program_Error;
@@ -63,7 +63,7 @@ package body System.Atomic_Primitives is
function Lock_Free_Read_32 (Ptr : Address) return uint32 is
begin
- if Support_Atomic_Primitives then
+ if uint32'Atomic_Always_Lock_Free then
return Atomic_Load_32 (Ptr, Acquire);
else
raise Program_Error;
@@ -76,7 +76,7 @@ package body System.Atomic_Primitives is
function Lock_Free_Read_64 (Ptr : Address) return uint64 is
begin
- if Support_Atomic_Primitives then
+ if uint64'Atomic_Always_Lock_Free then
return Atomic_Load_64 (Ptr, Acquire);
else
raise Program_Error;
@@ -97,7 +97,7 @@ package body System.Atomic_Primitives is
begin
if Expected /= Desired then
- if Support_Atomic_Primitives then
+ if uint8'Atomic_Always_Lock_Free then
Actual := Sync_Compare_And_Swap_8 (Ptr, Expected, Desired);
else
raise Program_Error;
@@ -126,7 +126,7 @@ package body System.Atomic_Primitives is
begin
if Expected /= Desired then
- if Support_Atomic_Primitives then
+ if uint16'Atomic_Always_Lock_Free then
Actual := Sync_Compare_And_Swap_16 (Ptr, Expected, Desired);
else
raise Program_Error;
@@ -155,7 +155,7 @@ package body System.Atomic_Primitives is
begin
if Expected /= Desired then
- if Support_Atomic_Primitives then
+ if uint32'Atomic_Always_Lock_Free then
Actual := Sync_Compare_And_Swap_32 (Ptr, Expected, Desired);
else
raise Program_Error;
@@ -184,7 +184,7 @@ package body System.Atomic_Primitives is
begin
if Expected /= Desired then
- if Support_Atomic_Primitives then
+ if uint64'Atomic_Always_Lock_Free then
Actual := Sync_Compare_And_Swap_64 (Ptr, Expected, Desired);
else
raise Program_Error;