[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:48:14 +0000 (11:48 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:48:14 +0000 (11:48 +0200)
2011-09-27  Pascal Obry  <obry@adacore.com>

* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
Add dummy definitions for pthread_rwlock_t
and pthread_rwlockattr_t on all POSIX platforms.
* s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
reference.
(Finalize_Lock): Likewise.
(Write_Lock): Likewise.
(Unlock): Likewise.

2011-09-27  Tristan Gingold  <gingold@adacore.com>

* s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
windows 64.

From-SVN: r179254

gcc/ada/ChangeLog
gcc/ada/s-osinte-aix.ads
gcc/ada/s-osinte-darwin.ads
gcc/ada/s-osinte-freebsd.ads
gcc/ada/s-osinte-hpux.ads
gcc/ada/s-osinte-irix.ads
gcc/ada/s-osinte-solaris-posix.ads
gcc/ada/s-taprop-irix.adb
gcc/ada/s-taprop-posix.adb
gcc/ada/s-tassta.adb

index 4f496a84065ae60c6011f488aff757036a597139..51e8176bda3d2faacf49cd874a1c924670849744 100644 (file)
@@ -1,3 +1,20 @@
+2011-09-27  Pascal Obry  <obry@adacore.com>
+
+       * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
+       s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
+       Add dummy definitions for pthread_rwlock_t
+       and pthread_rwlockattr_t on all POSIX platforms.
+       * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
+       reference.
+       (Finalize_Lock): Likewise.
+       (Write_Lock): Likewise.
+       (Unlock): Likewise.
+
+2011-09-27  Tristan Gingold  <gingold@adacore.com>
+
+       * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
+       windows 64.
+
 2011-09-27  Pascal Obry  <obry@adacore.com>
 
        * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
index 586d42f8f0a799b14996b2aa21aad5a20667bc5d..c8e660826042b503f4e0eaa241a74f22d48d7072 100644 (file)
@@ -276,6 +276,14 @@ package System.OS_Interface is
    PTHREAD_SCOPE_PROCESS : constant := 1;
    PTHREAD_SCOPE_SYSTEM  : constant := 0;
 
+   --  Read/Write lock not supported on AIX. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    -----------
    -- Stack --
    -----------
index 2bd15a8b211abc3e6b910bcd771c6b8629f32108..fe2a10a33152b872ba602bb3efaec3cc9b871232 100644 (file)
@@ -256,6 +256,14 @@ package System.OS_Interface is
    PTHREAD_SCOPE_PROCESS : constant := 2;
    PTHREAD_SCOPE_SYSTEM  : constant := 1;
 
+   --  Read/Write lock not supported on Darwin. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    -----------
    -- Stack --
    -----------
index 5c46c29b983a0f8895170b2314d08f824b97ec74..d3d5c8763e410bfd814a404759a5d42f98732d5e 100644 (file)
@@ -289,6 +289,14 @@ package System.OS_Interface is
    PTHREAD_SCOPE_PROCESS : constant := 0;
    PTHREAD_SCOPE_SYSTEM  : constant := 2;
 
+   --  Read/Write lock not supported on freebsd. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    -----------
    -- Stack --
    -----------
index 716d821654a02d8b1aba47bdb25ae7b008a82a37..bc9a7091d6fba4279ad7164d68d3d1a485bb385a 100644 (file)
@@ -265,6 +265,14 @@ package System.OS_Interface is
    PTHREAD_SCOPE_PROCESS : constant := 2;
    PTHREAD_SCOPE_SYSTEM  : constant := 1;
 
+   --  Read/Write lock not supported on HPUX. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    -----------
    -- Stack --
    -----------
index fb1bbb5c55cf859c861cc63f6cafd956b05a2a2a..ddeadcb61476d28242076f2e05b432bee60a6e46 100644 (file)
@@ -250,6 +250,14 @@ package System.OS_Interface is
 
    PTHREAD_CREATE_DETACHED : constant := 1;
 
+   --  Read/Write lock not supported on SGI. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    -----------
    -- Stack --
    -----------
index 6c266f9babfb56a56a57b7b3ba415d3d7d18f19d..8781a12dd6782f54b64743c8449729856079960a 100644 (file)
@@ -255,6 +255,14 @@ package System.OS_Interface is
    type pthread_condattr_t  is limited private;
    type pthread_key_t       is private;
 
+   --  Read/Write lock not supported on Solaris. To add support both types
+   --  pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+   --  with the associated routines pthread_rwlock_[init/destroy] and
+   --  pthread_rwlock_[rdlock/wrlock/unlock].
+
+   subtype pthread_rwlock_t     is pthread_mutex_t;
+   subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
    PTHREAD_CREATE_DETACHED : constant := 16#40#;
 
    PTHREAD_SCOPE_PROCESS : constant := 0;
index 264690499203161a142704ae2d55142e5b772626..5b4d4bef16e43ff4716589f19192c25a4f8c09f2 100644 (file)
@@ -255,7 +255,7 @@ package body System.Task_Primitives.Operations is
          pragma Assert (Result = 0);
       end if;
 
-      Result := pthread_mutex_init (L, Attributes'Access);
+      Result := pthread_mutex_init (L.WO'Access, Attributes'Access);
       pragma Assert (Result = 0 or else Result = ENOMEM);
 
       if Result = ENOMEM then
@@ -314,7 +314,7 @@ package body System.Task_Primitives.Operations is
    procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
-      Result := pthread_mutex_destroy (L);
+      Result := pthread_mutex_destroy (L.WO'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
@@ -335,7 +335,7 @@ package body System.Task_Primitives.Operations is
       Result : Interfaces.C.int;
 
    begin
-      Result := pthread_mutex_lock (L);
+      Result := pthread_mutex_lock (L.WO'Access);
       Ceiling_Violation := Result = EINVAL;
 
       --  Assumes the cause of EINVAL is a priority ceiling violation
@@ -381,7 +381,7 @@ package body System.Task_Primitives.Operations is
    procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
-      Result := pthread_mutex_unlock (L);
+      Result := pthread_mutex_unlock (L.WO'Access);
       pragma Assert (Result = 0);
    end Unlock;
 
index af0a597e5fc36766b953bb7834b466a206f7fafc..1dec99966eefa5d4bdb2199e31e4d37a2f277b28 100644 (file)
@@ -310,7 +310,7 @@ package body System.Task_Primitives.Operations is
          pragma Assert (Result = 0);
       end if;
 
-      Result := pthread_mutex_init (L, Attributes'Access);
+      Result := pthread_mutex_init (L.WO'Access, Attributes'Access);
       pragma Assert (Result = 0 or else Result = ENOMEM);
 
       if Result = ENOMEM then
@@ -372,7 +372,7 @@ package body System.Task_Primitives.Operations is
    procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
-      Result := pthread_mutex_destroy (L);
+      Result := pthread_mutex_destroy (L.WO'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
@@ -393,7 +393,7 @@ package body System.Task_Primitives.Operations is
       Result : Interfaces.C.int;
 
    begin
-      Result := pthread_mutex_lock (L);
+      Result := pthread_mutex_lock (L.WO'Access);
 
       --  Assume that the cause of EINVAL is a priority ceiling violation
 
@@ -439,7 +439,7 @@ package body System.Task_Primitives.Operations is
    procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
-      Result := pthread_mutex_unlock (L);
+      Result := pthread_mutex_unlock (L.WO'Access);
       pragma Assert (Result = 0);
    end Unlock;
 
index 6449bf6b01715f31852b2c20d5f77ac9e4153539..27c847df6e9aadcd8a7fca327fa84e42ef6e5352 100644 (file)
@@ -1164,7 +1164,7 @@ package body System.Tasking.Stages is
 
       if System.Stack_Usage.Is_Enabled then
          declare
-            Guard_Page_Size : constant := 12 * 1024;
+            Guard_Page_Size : constant := 16 * 1024;
             --  Part of the stack used as a guard page. This is an OS dependent
             --  value, so we need to use the maximum. This value is only used
             --  when the stack address is known, that is currently Windows.