Debian Codegraph @

gcc/ada/libgnat/g-spogwa.ads

raw
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- G N A T . S O C K E T S . P O L L . G _ W A I T --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2020-2025, AdaCore --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 with Interfaces.C;
33
34 private generic
35 type FD_Set_Type is private;
36 with procedure Reset_Socket_Set (Set : in out FD_Set_Type);
37 with procedure Insert_Socket_In_Set
38 (Set : in out FD_Set_Type; FD : FD_Type);
39 with function Is_Socket_In_Set
40 (Set : FD_Set_Type; FD : FD_Type) return Interfaces.C.int;
41 procedure GNAT.Sockets.Poll.G_Wait
42 (Fds : in out Set; Timeout : Interfaces.C.int; Result : out Integer);
43 -- Common code to implement GNAT.Sockets.Poll.Wait routine on top of posix or
44 -- win32 select API.
45 -- Posix and Win32 select has the same API but different socket set structure.
46 -- C API for select has socket set size defined at compilation stage. This Ada
47 -- implementation allow to define size of socket set at the execution time.
48 -- Unlike C select API we do not need allocate socket set for maximum number
49 -- of sockets when we need to check only few of them. And we are not limited
50 -- with FD_SETSIZE when we need more sockets to check.