From 196b199369f3e1f24c391891fcf9ab90de2a2739 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 30 Nov 2009 11:45:39 +0100 Subject: [multiple changes] 2009-11-30 Robert Dewar * osint.ads, prj.adb, prj.ads: Minor reformatting * s-stchop.adb, s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb, s-taprop-linux.adb, s-taprop-solaris.adb, s-strxdr.adb, s-taprop-irix.adb, s-osinte-hpux-dce.adb, s-osinte-tru64.adb, s-taenca.adb, s-taprop-hpux-dce.adb, s-stausa.adb, s-taprop-posix.adb: Minor code reorganization (use conditional expressions). 2009-11-30 Bob Duff * g-sttsne-locking.adb (Copy_Service_Entry): Complete previous change. From-SVN: r154779 --- gcc/ada/s-taprop-vms.adb | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'gcc/ada/s-taprop-vms.adb') diff --git a/gcc/ada/s-taprop-vms.adb b/gcc/ada/s-taprop-vms.adb index eb8c0f1..582f88b 100644 --- a/gcc/ada/s-taprop-vms.adb +++ b/gcc/ada/s-taprop-vms.adb @@ -408,15 +408,12 @@ package body System.Task_Primitives.Operations is Result : Interfaces.C.int; begin - if Single_Lock then - Result := - pthread_cond_wait - (Self_ID.Common.LL.CV'Access, Single_RTS_Lock'Access); - else - Result := - pthread_cond_wait - (Self_ID.Common.LL.CV'Access, Self_ID.Common.LL.L'Access); - end if; + Result := + pthread_cond_wait + (cond => Self_ID.Common.LL.CV'Access, + mutex => (if Single_Lock + then Single_RTS_Lock'Access + else Self_ID.Common.LL.L'Access)); -- EINTR is not considered a failure @@ -540,19 +537,13 @@ package body System.Task_Primitives.Operations is exit; end if; - if Single_Lock then - Result := - pthread_cond_wait - (Self_ID.Common.LL.CV'Access, - Single_RTS_Lock'Access); - pragma Assert (Result = 0); - else - Result := - pthread_cond_wait - (Self_ID.Common.LL.CV'Access, - Self_ID.Common.LL.L'Access); - pragma Assert (Result = 0); - end if; + Result := + pthread_cond_wait + (cond => Self_ID.Common.LL.CV'Access, + mutex => (if Single_Lock + then Single_RTS_Lock'Access + else Self_ID.Common.LL.L'Access)); + pragma Assert (Result = 0); Yielded := True; -- cgit v1.1