Commit 6f5add73 by Arnaud Charlet

[multiple changes]

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
parent 64a63cd5
2011-09-27 Pascal Obry <obry@adacore.com> 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, * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads, s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads, s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
......
...@@ -276,6 +276,14 @@ package System.OS_Interface is ...@@ -276,6 +276,14 @@ package System.OS_Interface is
PTHREAD_SCOPE_PROCESS : constant := 1; PTHREAD_SCOPE_PROCESS : constant := 1;
PTHREAD_SCOPE_SYSTEM : constant := 0; 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 -- -- Stack --
----------- -----------
......
...@@ -256,6 +256,14 @@ package System.OS_Interface is ...@@ -256,6 +256,14 @@ package System.OS_Interface is
PTHREAD_SCOPE_PROCESS : constant := 2; PTHREAD_SCOPE_PROCESS : constant := 2;
PTHREAD_SCOPE_SYSTEM : constant := 1; 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 -- -- Stack --
----------- -----------
......
...@@ -289,6 +289,14 @@ package System.OS_Interface is ...@@ -289,6 +289,14 @@ package System.OS_Interface is
PTHREAD_SCOPE_PROCESS : constant := 0; PTHREAD_SCOPE_PROCESS : constant := 0;
PTHREAD_SCOPE_SYSTEM : constant := 2; 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 -- -- Stack --
----------- -----------
......
...@@ -265,6 +265,14 @@ package System.OS_Interface is ...@@ -265,6 +265,14 @@ package System.OS_Interface is
PTHREAD_SCOPE_PROCESS : constant := 2; PTHREAD_SCOPE_PROCESS : constant := 2;
PTHREAD_SCOPE_SYSTEM : constant := 1; 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 -- -- Stack --
----------- -----------
......
...@@ -250,6 +250,14 @@ package System.OS_Interface is ...@@ -250,6 +250,14 @@ package System.OS_Interface is
PTHREAD_CREATE_DETACHED : constant := 1; 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 -- -- Stack --
----------- -----------
......
...@@ -255,6 +255,14 @@ package System.OS_Interface is ...@@ -255,6 +255,14 @@ package System.OS_Interface is
type pthread_condattr_t is limited private; type pthread_condattr_t is limited private;
type pthread_key_t is 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_CREATE_DETACHED : constant := 16#40#;
PTHREAD_SCOPE_PROCESS : constant := 0; PTHREAD_SCOPE_PROCESS : constant := 0;
......
...@@ -255,7 +255,7 @@ package body System.Task_Primitives.Operations is ...@@ -255,7 +255,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0); pragma Assert (Result = 0);
end if; 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); pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then if Result = ENOMEM then
...@@ -314,7 +314,7 @@ package body System.Task_Primitives.Operations is ...@@ -314,7 +314,7 @@ package body System.Task_Primitives.Operations is
procedure Finalize_Lock (L : not null access Lock) is procedure Finalize_Lock (L : not null access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_destroy (L); Result := pthread_mutex_destroy (L.WO'Access);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Finalize_Lock; end Finalize_Lock;
...@@ -335,7 +335,7 @@ package body System.Task_Primitives.Operations is ...@@ -335,7 +335,7 @@ package body System.Task_Primitives.Operations is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_lock (L); Result := pthread_mutex_lock (L.WO'Access);
Ceiling_Violation := Result = EINVAL; Ceiling_Violation := Result = EINVAL;
-- Assumes the cause of EINVAL is a priority ceiling violation -- Assumes the cause of EINVAL is a priority ceiling violation
...@@ -381,7 +381,7 @@ package body System.Task_Primitives.Operations is ...@@ -381,7 +381,7 @@ package body System.Task_Primitives.Operations is
procedure Unlock (L : not null access Lock) is procedure Unlock (L : not null access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_unlock (L); Result := pthread_mutex_unlock (L.WO'Access);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Unlock; end Unlock;
......
...@@ -310,7 +310,7 @@ package body System.Task_Primitives.Operations is ...@@ -310,7 +310,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0); pragma Assert (Result = 0);
end if; 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); pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then if Result = ENOMEM then
...@@ -372,7 +372,7 @@ package body System.Task_Primitives.Operations is ...@@ -372,7 +372,7 @@ package body System.Task_Primitives.Operations is
procedure Finalize_Lock (L : not null access Lock) is procedure Finalize_Lock (L : not null access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_destroy (L); Result := pthread_mutex_destroy (L.WO'Access);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Finalize_Lock; end Finalize_Lock;
...@@ -393,7 +393,7 @@ package body System.Task_Primitives.Operations is ...@@ -393,7 +393,7 @@ package body System.Task_Primitives.Operations is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_lock (L); Result := pthread_mutex_lock (L.WO'Access);
-- Assume that the cause of EINVAL is a priority ceiling violation -- Assume that the cause of EINVAL is a priority ceiling violation
...@@ -439,7 +439,7 @@ package body System.Task_Primitives.Operations is ...@@ -439,7 +439,7 @@ package body System.Task_Primitives.Operations is
procedure Unlock (L : not null access Lock) is procedure Unlock (L : not null access Lock) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_mutex_unlock (L); Result := pthread_mutex_unlock (L.WO'Access);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Unlock; end Unlock;
......
...@@ -1164,7 +1164,7 @@ package body System.Tasking.Stages is ...@@ -1164,7 +1164,7 @@ package body System.Tasking.Stages is
if System.Stack_Usage.Is_Enabled then if System.Stack_Usage.Is_Enabled then
declare 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 -- 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 -- value, so we need to use the maximum. This value is only used
-- when the stack address is known, that is currently Windows. -- when the stack address is known, that is currently Windows.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment