Debian Codegraph @

share/libc/sys/select.h

raw
1 /**************************************************************************/
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /**************************************************************************/
22
23 #ifndef __FC_SYS_SELECT_H__
24 #define __FC_SYS_SELECT_H__
25 #include "features.h"
26 __PUSH_FC_STDLIB
27 __BEGIN_DECLS
28
29 #include "../__fc_select.h"
30
31 /*@
32 requires valid_fdset: \valid(fdset);
33 requires initialization: \initialized(fdset);
34 assigns *fdset \from *fdset, indirect:fd;
35 */
36 extern void FD_CLR(int fd, fd_set *fdset);
37 #define FD_CLR FD_CLR
38
39 // Note: the 2nd argument in FD_ISSET is not const in some implementations
40 // due to historical and compatibility reasons.
41 /*@
42 requires valid_fdset: \valid_read(fdset);
43 requires initialization: \initialized(fdset);
44 assigns \result \from indirect:*fdset, indirect:fd;
45 */
46 extern int FD_ISSET(int fd, const fd_set *fdset);
47 #define FD_ISSET FD_ISSET
48
49 /*@
50 requires valid_fdset: \valid(fdset);
51 requires initialization: \initialized(fdset);
52 assigns *fdset \from *fdset, indirect:fd;
53 */
54 extern void FD_SET(int fd, fd_set *fdset);
55 #define FD_SET FD_SET
56
57 /*@
58 requires valid_fdset: \valid(fdset);
59 assigns *fdset \from \nothing;
60 ensures initialization: \initialized(fdset);
61 */
62 extern void FD_ZERO(fd_set *fdset);
63 #define FD_ZERO FD_ZERO
64
65 __END_DECLS
66 __POP_FC_STDLIB
67 #endif