g-socket.ads, [...] (Close_Selector): Once the signalling sockets are closed...
2006-10-31 Thomas Quinot <quinot@adacore.com> * g-socket.ads, g-socket.adb (Close_Selector): Once the signalling sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components to No_Socket. (Selector_Type): Add default value of No_Socket for R_Sig_Socket and W_Sig_Socket. From-SVN: r118280
This commit is contained in:
parent
8967c38f74
commit
ad98c85e5b
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 2001-2005, AdaCore --
|
-- Copyright (C) 2001-2006, AdaCore --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- GNAT 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- --
|
||||||
|
@ -560,6 +560,12 @@ package body GNAT.Sockets is
|
||||||
when Socket_Error =>
|
when Socket_Error =>
|
||||||
null;
|
null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
-- Reset R_Sig_Socket and W_Sig_Socket to No_Socket to ensure that any
|
||||||
|
-- (errneous) subsequent attempt to use this selector properly fails.
|
||||||
|
|
||||||
|
Selector.R_Sig_Socket := No_Socket;
|
||||||
|
Selector.W_Sig_Socket := No_Socket;
|
||||||
end Close_Selector;
|
end Close_Selector;
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 2001-2005, AdaCore --
|
-- Copyright (C) 2001-2006, AdaCore --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- GNAT 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- --
|
||||||
|
@ -961,7 +961,10 @@ package GNAT.Sockets is
|
||||||
-- Create a new selector
|
-- Create a new selector
|
||||||
|
|
||||||
procedure Close_Selector (Selector : in out Selector_Type);
|
procedure Close_Selector (Selector : in out Selector_Type);
|
||||||
-- Close Selector and all internal descriptors associated
|
-- Close Selector and all internal descriptors associated; deallocate any
|
||||||
|
-- associated resources. This subprogram may be called only when there is
|
||||||
|
-- no other task still using Selector (i.e. still executing Check_Selector
|
||||||
|
-- or Abort_Selector on this Selector).
|
||||||
|
|
||||||
type Selector_Status is (Completed, Expired, Aborted);
|
type Selector_Status is (Completed, Expired, Aborted);
|
||||||
|
|
||||||
|
@ -1007,8 +1010,8 @@ private
|
||||||
No_Socket : constant Socket_Type := -1;
|
No_Socket : constant Socket_Type := -1;
|
||||||
|
|
||||||
type Selector_Type is limited record
|
type Selector_Type is limited record
|
||||||
R_Sig_Socket : Socket_Type;
|
R_Sig_Socket : Socket_Type := No_Socket;
|
||||||
W_Sig_Socket : Socket_Type;
|
W_Sig_Socket : Socket_Type := No_Socket;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
pragma Volatile (Selector_Type);
|
pragma Volatile (Selector_Type);
|
||||||
|
|
Loading…
Reference in New Issue