Commit 7a5debc9 by Arnaud Charlet

[multiple changes]

2009-07-09  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Check_Selector): Do not create local copies of the
	socket sets on the stack.

2009-07-09  Vasiliy Fofanov  <fofanov@adacore.com>

	* gnat_ugn.texi: Add missing VMS translations.

From-SVN: r149414
parent 3f92c93b
2009-07-09 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Check_Selector): Do not create local copies of the
socket sets on the stack.
2009-07-09 Vasiliy Fofanov <fofanov@adacore.com>
* gnat_ugn.texi: Add missing VMS translations.
2009-07-09 Ed Schonberg <schonberg@adacore.com> 2009-07-09 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Precondition): Do not analyze the * sem_prag.adb (Analyze_Pragma, case Precondition): Do not analyze the
......
...@@ -465,9 +465,6 @@ package body GNAT.Sockets is ...@@ -465,9 +465,6 @@ package body GNAT.Sockets is
Res : C.int; Res : C.int;
Last : C.int; Last : C.int;
RSig : Socket_Type renames Selector.R_Sig_Socket; RSig : Socket_Type renames Selector.R_Sig_Socket;
RSet : Socket_Set_Type;
WSet : Socket_Set_Type;
ESet : Socket_Set_Type;
TVal : aliased Timeval; TVal : aliased Timeval;
TPtr : Timeval_Access; TPtr : Timeval_Access;
...@@ -483,29 +480,20 @@ package body GNAT.Sockets is ...@@ -483,29 +480,20 @@ package body GNAT.Sockets is
TPtr := TVal'Unchecked_Access; TPtr := TVal'Unchecked_Access;
end if; end if;
-- Copy R_Socket_Set in RSet and add read signalling socket -- Add read signalling socket
RSet := R_Socket_Set; Set (R_Socket_Set, RSig);
Set (RSet, RSig);
-- Copy W_Socket_Set in WSet Last := C.int'Max (C.int'Max (C.int (R_Socket_Set.Last),
C.int (W_Socket_Set.Last)),
WSet := W_Socket_Set; C.int (E_Socket_Set.Last));
-- Copy E_Socket_Set in ESet
ESet := E_Socket_Set;
Last := C.int'Max (C.int'Max (C.int (RSet.Last),
C.int (WSet.Last)),
C.int (ESet.Last));
Res := Res :=
C_Select C_Select
(Last + 1, (Last + 1,
RSet.Set'Access, R_Socket_Set.Set'Access,
WSet.Set'Access, W_Socket_Set.Set'Access,
ESet.Set'Access, E_Socket_Set.Set'Access,
TPtr); TPtr);
if Res = Failure then if Res = Failure then
...@@ -515,8 +503,8 @@ package body GNAT.Sockets is ...@@ -515,8 +503,8 @@ package body GNAT.Sockets is
-- If Select was resumed because of read signalling socket, read this -- If Select was resumed because of read signalling socket, read this
-- data and remove socket from set. -- data and remove socket from set.
if Is_Set (RSet, RSig) then if Is_Set (R_Socket_Set, RSig) then
Clear (RSet, RSig); Clear (R_Socket_Set, RSig);
Res := Signalling_Fds.Read (C.int (RSig)); Res := Signalling_Fds.Read (C.int (RSig));
...@@ -530,31 +518,11 @@ package body GNAT.Sockets is ...@@ -530,31 +518,11 @@ package body GNAT.Sockets is
Status := Expired; Status := Expired;
end if; end if;
-- Update RSet, WSet and ESet in regard to their new socket sets -- Update socket sets in regard to their new contents
Narrow (RSet);
Narrow (WSet);
Narrow (ESet);
-- Reset RSet as it should be if R_Sig_Socket was not added
if Is_Empty (RSet) then
Empty (RSet);
end if;
if Is_Empty (WSet) then
Empty (WSet);
end if;
if Is_Empty (ESet) then
Empty (ESet);
end if;
-- Deliver RSet, WSet and ESet
R_Socket_Set := RSet; Narrow (R_Socket_Set);
W_Socket_Set := WSet; Narrow (W_Socket_Set);
E_Socket_Set := ESet; Narrow (E_Socket_Set);
end Check_Selector; end Check_Selector;
----------- -----------
......
...@@ -6996,8 +6996,8 @@ This not normally required, but is used by separate analysis tools. ...@@ -6996,8 +6996,8 @@ This not normally required, but is used by separate analysis tools.
Typically Typically
these tools do the necessary compilations automatically, so you should these tools do the necessary compilations automatically, so you should
not have to specify this switch in normal operation. not have to specify this switch in normal operation.
Note that the combination of switches @option{-gnatct} generates a tree Note that the combination of switches @option{^-gnatct^/NOLOAD /TREE_OUTPUT^}
in the form required by ASIS applications. generates a tree in the form required by ASIS applications.
@item -gnatu @item -gnatu
@cindex @option{-gnatu} (@command{gcc}) @cindex @option{-gnatu} (@command{gcc})
...@@ -20824,8 +20824,8 @@ structure and semantics as the @code{string_LITERAL} parameter of GNAT pragma ...@@ -20824,8 +20824,8 @@ structure and semantics as the @code{string_LITERAL} parameter of GNAT pragma
@code{Style_Checks} (for further information about this pragma, @code{Style_Checks} (for further information about this pragma,
@pxref{Pragma Style_Checks,,, gnat_rm, GNAT Reference Manual}). For example, @pxref{Pragma Style_Checks,,, gnat_rm, GNAT Reference Manual}). For example,
@code{+RStyle_Checks:O} rule option activates and adds to @command{gnatcheck} @code{+RStyle_Checks:O} rule option activates and adds to @command{gnatcheck}
output the compiler style check that corresponds to @code{-gnatyO} style output the compiler style check that corresponds to
check option. @code{^-gnatyO^/STYLE_CHECKS=OVERRIDING_INDICATORS^} style check option.
@item Warnings @item Warnings
To record compiler warnings (@pxref{Warning Message Control}), use the rule To record compiler warnings (@pxref{Warning Message Control}), use the rule
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