aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 17:13:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 17:13:23 +0200
commite1aca34380564f548add01b7492075bc57f63ab2 (patch)
tree65d7f0e739dcdf60e4b2300d57a90316c6f89435 /gcc/ada/g-socket.ads
parent74462a6a0cf7e28d57e83bd65484ade52316665a (diff)
downloadgcc-e1aca34380564f548add01b7492075bc57f63ab2.zip
gcc-e1aca34380564f548add01b7492075bc57f63ab2.tar.gz
gcc-e1aca34380564f548add01b7492075bc57f63ab2.tar.bz2
[multiple changes]
2009-07-22 Ed Falis <falis@adacore.com> * s-vxwext-kernel.adb, s-vxwext-kernel.ads: Replace use of taskStop with taskSuspend. 2009-07-22 Arnaud Charlet <charlet@adacore.com> * adadecode.c: Make this file compilable outside of GCC. 2009-07-22 Thomas Quinot <quinot@adacore.com> * g-socket.adb, g-socket.ads (Check_Selector): Make sure that (partially) default-initialized socket sets are handled properly by clearing their Set component. 2009-07-22 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Clarify the -gnatVx (validity checking) switches. From-SVN: r149939
Diffstat (limited to 'gcc/ada/g-socket.ads')
-rw-r--r--gcc/ada/g-socket.ads17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads
index c5bf473..a260d90 100644
--- a/gcc/ada/g-socket.ads
+++ b/gcc/ada/g-socket.ads
@@ -1010,7 +1010,9 @@ package GNAT.Sockets is
type Socket_Set_Type is limited private;
-- This type allows to manipulate sets of sockets. It allows to wait for
- -- events on multiple endpoints at one time.
+ -- events on multiple endpoints at one time. This type has default
+ -- initialization, and the default value is the empty set.
+ --
-- Note: This type used to contain a pointer to dynamically allocated
-- storage, but this is not the case anymore, and no special precautions
-- are required to avoid memory leaks.
@@ -1018,10 +1020,10 @@ package GNAT.Sockets is
procedure Clear (Item : in out Socket_Set_Type; Socket : Socket_Type);
-- Remove Socket from Item
- procedure Copy (Source : Socket_Set_Type; Target : in out Socket_Set_Type);
+ procedure Copy (Source : Socket_Set_Type; Target : out Socket_Set_Type);
-- Copy Source into Target as Socket_Set_Type is limited private
- procedure Empty (Item : in out Socket_Set_Type);
+ procedure Empty (Item : out Socket_Set_Type);
-- Remove all Sockets from Item
procedure Get (Item : in out Socket_Set_Type; Socket : out Socket_Type);
@@ -1141,7 +1143,12 @@ private
type Socket_Set_Type is record
Last : Socket_Type := No_Socket;
+ -- Highest socket in set. Last = No_Socket denotes an empty set (which
+ -- is the default initial value).
+
Set : aliased Fd_Set;
+ -- Underlying socket set. Note that the contents of this component is
+ -- undefined if Last = No_Socket.
end record;
subtype Inet_Addr_Comp_Type is Natural range 0 .. 255;
@@ -1188,9 +1195,7 @@ private
subtype Name_Index is Natural range 1 .. Max_Name_Length;
- type Name_Type
- (Length : Name_Index := Max_Name_Length)
- is record
+ type Name_Type (Length : Name_Index := Max_Name_Length) is record
Name : String (1 .. Length);
end record;
-- We need fixed strings to avoid access types in host entry type