Commit 1dd5ad55 by Arnaud Charlet

s-osinte-darwin.adb, [...] (sigset_t_ptr): Removed, replaced by anonymous access type.

	* s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-vxworks.ads, 
	s-osinte-solaris.ads, s-osinte-linux.ads, s-osinte-freebsd.ads, 
	s-osinte-solaris-posix.ads, s-osinte-lynxos-3.ads, s-osinte-lynxos.ads, 
	s-osinte-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads, 
	s-osinte-hpux-dce.ads, s-osinte-linux-hppa.ads, 
	s-osinte-linux-alpha.ads, s-inmaop-posix.adb (sigset_t_ptr): Removed,
	replaced by anonymous access type.
	(pthread_sigmask): Now take an access sigset_t

	* s-osinte-hpux.ads:  Ditto.
	(pthread_mutex_t, pthread_cond_t): Update definitions to support
	properly 32 and 64 bit ABIs.

From-SVN: r111025
parent 3ede876b
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, AdaCore -- -- Copyright (C) 1995-2006, AdaCore --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -48,18 +48,11 @@ with System.Storage_Elements; ...@@ -48,18 +48,11 @@ with System.Storage_Elements;
-- used for To_Address -- used for To_Address
-- Integer_Address -- Integer_Address
with Unchecked_Conversion;
package body System.Interrupt_Management.Operations is package body System.Interrupt_Management.Operations is
use Interfaces.C; use Interfaces.C;
use System.OS_Interface; use System.OS_Interface;
type Interrupt_Mask_Ptr is access all Interrupt_Mask;
function "+" is new
Unchecked_Conversion (Interrupt_Mask_Ptr, sigset_t_ptr);
--------------------- ---------------------
-- Local Variables -- -- Local Variables --
--------------------- ---------------------
...@@ -113,8 +106,7 @@ package body System.Interrupt_Management.Operations is ...@@ -113,8 +106,7 @@ package body System.Interrupt_Management.Operations is
procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask) is procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_sigmask Result := pthread_sigmask (SIG_SETMASK, Mask, null);
(SIG_SETMASK, +Interrupt_Mask_Ptr (Mask), null);
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Set_Interrupt_Mask; end Set_Interrupt_Mask;
...@@ -124,8 +116,7 @@ package body System.Interrupt_Management.Operations is ...@@ -124,8 +116,7 @@ package body System.Interrupt_Management.Operations is
is is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_sigmask Result := pthread_sigmask (SIG_SETMASK, Mask, OMask);
(SIG_SETMASK, +Interrupt_Mask_Ptr (Mask), +Interrupt_Mask_Ptr (OMask));
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Set_Interrupt_Mask; end Set_Interrupt_Mask;
...@@ -136,8 +127,7 @@ package body System.Interrupt_Management.Operations is ...@@ -136,8 +127,7 @@ package body System.Interrupt_Management.Operations is
procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask) is procedure Get_Interrupt_Mask (Mask : access Interrupt_Mask) is
Result : Interfaces.C.int; Result : Interfaces.C.int;
begin begin
Result := pthread_sigmask Result := pthread_sigmask (SIG_SETMASK, null, Mask);
(SIG_SETMASK, null, +Interrupt_Mask_Ptr (Mask));
pragma Assert (Result = 0); pragma Assert (Result = 0);
end Get_Interrupt_Mask; end Get_Interrupt_Mask;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -324,12 +324,10 @@ package System.OS_Interface is ...@@ -324,12 +324,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "sigthreadmask"); pragma Import (C, pthread_sigmask, "sigthreadmask");
-------------------------- --------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1999-2005 Free Software Foundation, Inc. -- -- Copyright (C) 1999-2006 Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -37,8 +37,6 @@ pragma Polling (Off); ...@@ -37,8 +37,6 @@ pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during -- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems. -- tasking operations. It causes infinite loops and other problems.
with Interfaces.C;
package body System.OS_Interface is package body System.OS_Interface is
use Interfaces.C; use Interfaces.C;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -302,12 +302,10 @@ package System.OS_Interface is ...@@ -302,12 +302,10 @@ package System.OS_Interface is
function pthread_kill (thread : pthread_t; sig : Signal) return int; function pthread_kill (thread : pthread_t; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -353,12 +353,10 @@ package System.OS_Interface is ...@@ -353,12 +353,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -287,12 +287,10 @@ package System.OS_Interface is ...@@ -287,12 +287,10 @@ package System.OS_Interface is
pragma Inline (pthread_kill); pragma Inline (pthread_kill);
-- DCE_THREADS doesn't have pthread_kill -- DCE_THREADS doesn't have pthread_kill
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
-- DCE THREADS does not have pthread_sigmask. Instead, it uses -- DCE THREADS does not have pthread_sigmask. Instead, it uses
-- sigprocmask to do the signal handling when the thread library is -- sigprocmask to do the signal handling when the thread library is
-- sucked in. -- sucked in.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -320,12 +320,10 @@ package System.OS_Interface is ...@@ -320,12 +320,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
...@@ -529,26 +527,33 @@ private ...@@ -529,26 +527,33 @@ private
m_short : short_array (0 .. 1); m_short : short_array (0 .. 1);
m_int : int; m_int : int;
m_int1 : int_array (0 .. 3); m_int1 : int_array (0 .. 3);
m_pad : int; -- needed for 32 bit ABI, but *not* for 64 bit m_pad : int;
m_ptr : System.Address;
m_ptr : int;
-- actually m_ptr is a void*, and on 32 bit ABI, m_pad is added so that
-- this field takes 64 bits. On 64 bit ABI, m_pad is gone, and m_ptr is
-- a 64 bit void*. Assume int'Size = 32.
m_int2 : int_array (0 .. 1); m_int2 : int_array (0 .. 1);
m_int3 : int_array (0 .. 3); m_int3 : int_array (0 .. 3);
m_short2 : short_array (0 .. 1); m_short2 : short_array (0 .. 1);
m_int4 : int_array (0 .. 4); m_int4 : int_array (0 .. 4);
m_int5 : int_array (0 .. 1); m_int5 : int_array (0 .. 1);
end record; end record;
for pthread_mutex_t'Alignment use System.Address'Alignment;
pragma Convention (C, pthread_mutex_t); pragma Convention (C, pthread_mutex_t);
type pthread_cond_t is record type pthread_cond_t is record
c_short : short_array (0 .. 1); c_short : short_array (0 .. 1);
c_int : int; c_int : int;
c_int1 : int_array (0 .. 3); c_int1 : int_array (0 .. 3);
m_pad : int; -- needed for 32 bit ABI, but *not* for 64 bit m_pad : int;
m_ptr : System.Address; m_ptr : int; -- see comment in pthread_mutex_t
c_int2 : int_array (0 .. 1); c_int2 : int_array (0 .. 1);
c_int3 : int_array (0 .. 1); c_int3 : int_array (0 .. 1);
c_int4 : int_array (0 .. 1); c_int4 : int_array (0 .. 1);
end record; end record;
for pthread_cond_t'Alignment use System.Address'Alignment;
pragma Convention (C, pthread_cond_t); pragma Convention (C, pthread_cond_t);
type pthread_key_t is new int; type pthread_key_t is new int;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -127,7 +127,6 @@ package System.OS_Interface is ...@@ -127,7 +127,6 @@ package System.OS_Interface is
SIGRTMAX : constant := 64; -- Posix 1003.1b signals SIGRTMAX : constant := 64; -- Posix 1003.1b signals
type sigset_t is private; type sigset_t is private;
type sigset_t_ptr is access all sigset_t;
function sigaddset (set : access sigset_t; sig : Signal) return int; function sigaddset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigaddset, "sigaddset"); pragma Import (C, sigaddset, "sigaddset");
...@@ -284,8 +283,8 @@ package System.OS_Interface is ...@@ -284,8 +283,8 @@ package System.OS_Interface is
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -309,12 +309,10 @@ package System.OS_Interface is ...@@ -309,12 +309,10 @@ package System.OS_Interface is
function pthread_kill (thread : pthread_t; sig : Signal) return int; function pthread_kill (thread : pthread_t; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
-- (GNU/Linux-HPPA Version) -- -- (GNU/Linux-HPPA Version) --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -316,12 +316,10 @@ package System.OS_Interface is ...@@ -316,12 +316,10 @@ package System.OS_Interface is
function pthread_kill (thread : pthread_t; sig : Signal) return int; function pthread_kill (thread : pthread_t; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -314,12 +314,10 @@ package System.OS_Interface is ...@@ -314,12 +314,10 @@ package System.OS_Interface is
function pthread_kill (thread : pthread_t; sig : Signal) return int; function pthread_kill (thread : pthread_t; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -308,12 +308,10 @@ package System.OS_Interface is ...@@ -308,12 +308,10 @@ package System.OS_Interface is
function pthread_kill (thread : pthread_t; sig : Signal) return int; function pthread_kill (thread : pthread_t; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "sigprocmask"); pragma Import (C, pthread_sigmask, "sigprocmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -332,12 +332,10 @@ package System.OS_Interface is ...@@ -332,12 +332,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-- The behavior of pthread_sigmask on LynxOS requires -- The behavior of pthread_sigmask on LynxOS requires
-- further investigation. -- further investigation.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -306,12 +306,10 @@ package System.OS_Interface is ...@@ -306,12 +306,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill"); pragma Import (C, pthread_kill, "pthread_kill");
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask"); pragma Import (C, pthread_sigmask, "pthread_sigmask");
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -400,18 +400,16 @@ package System.OS_Interface is ...@@ -400,18 +400,16 @@ package System.OS_Interface is
function thr_kill (thread : thread_t; sig : Signal) return int; function thr_kill (thread : thread_t; sig : Signal) return int;
pragma Import (C, thr_kill, "thr_kill"); pragma Import (C, thr_kill, "thr_kill");
type sigset_t_ptr is access all sigset_t;
function thr_sigsetmask function thr_sigsetmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, thr_sigsetmask, "thr_sigsetmask"); pragma Import (C, thr_sigsetmask, "thr_sigsetmask");
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "thr_sigsetmask"); pragma Import (C, pthread_sigmask, "thr_sigsetmask");
function thr_suspend (target_thread : thread_t) return int; function thr_suspend (target_thread : thread_t) return int;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -335,12 +335,10 @@ package System.OS_Interface is ...@@ -335,12 +335,10 @@ package System.OS_Interface is
sig : Signal) return int; sig : Signal) return int;
pragma Import (C, pthread_kill); pragma Import (C, pthread_kill);
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask); pragma Import (C, pthread_sigmask);
-------------------------- --------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1995-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -141,12 +141,10 @@ package System.OS_Interface is ...@@ -141,12 +141,10 @@ package System.OS_Interface is
function sigwait (set : access sigset_t; sig : access Signal) return int; function sigwait (set : access sigset_t; sig : access Signal) return int;
pragma Inline (sigwait); pragma Inline (sigwait);
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask function pthread_sigmask
(how : int; (how : int;
set : sigset_t_ptr; set : access sigset_t;
oset : sigset_t_ptr) return int; oset : access sigset_t) return int;
pragma Import (C, pthread_sigmask, "sigprocmask"); pragma Import (C, pthread_sigmask, "sigprocmask");
type t_id is new long; type t_id is new long;
......
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