Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/sys
File: select.h
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
[0] Fix | Delete
Copyright (C) 1996-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
/* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
[18] Fix | Delete
[19] Fix | Delete
#ifndef _SYS_SELECT_H
[20] Fix | Delete
#define _SYS_SELECT_H 1
[21] Fix | Delete
[22] Fix | Delete
#include <features.h>
[23] Fix | Delete
[24] Fix | Delete
/* Get definition of needed basic types. */
[25] Fix | Delete
#include <bits/types.h>
[26] Fix | Delete
[27] Fix | Delete
/* Get __FD_* definitions. */
[28] Fix | Delete
#include <bits/select.h>
[29] Fix | Delete
[30] Fix | Delete
/* Get sigset_t. */
[31] Fix | Delete
#include <bits/types/sigset_t.h>
[32] Fix | Delete
[33] Fix | Delete
/* Get definition of timer specification structures. */
[34] Fix | Delete
#include <bits/types/time_t.h>
[35] Fix | Delete
#include <bits/types/struct_timeval.h>
[36] Fix | Delete
#ifdef __USE_XOPEN2K
[37] Fix | Delete
# include <bits/types/struct_timespec.h>
[38] Fix | Delete
#endif
[39] Fix | Delete
[40] Fix | Delete
#ifndef __suseconds_t_defined
[41] Fix | Delete
typedef __suseconds_t suseconds_t;
[42] Fix | Delete
# define __suseconds_t_defined
[43] Fix | Delete
#endif
[44] Fix | Delete
[45] Fix | Delete
[46] Fix | Delete
/* The fd_set member is required to be an array of longs. */
[47] Fix | Delete
typedef long int __fd_mask;
[48] Fix | Delete
[49] Fix | Delete
/* Some versions of <linux/posix_types.h> define this macros. */
[50] Fix | Delete
#undef __NFDBITS
[51] Fix | Delete
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
[52] Fix | Delete
#define __NFDBITS (8 * (int) sizeof (__fd_mask))
[53] Fix | Delete
#define __FD_ELT(d) ((d) / __NFDBITS)
[54] Fix | Delete
#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
[55] Fix | Delete
[56] Fix | Delete
/* fd_set for select and pselect. */
[57] Fix | Delete
typedef struct
[58] Fix | Delete
{
[59] Fix | Delete
/* XPG4.2 requires this member name. Otherwise avoid the name
[60] Fix | Delete
from the global namespace. */
[61] Fix | Delete
#ifdef __USE_XOPEN
[62] Fix | Delete
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
[63] Fix | Delete
# define __FDS_BITS(set) ((set)->fds_bits)
[64] Fix | Delete
#else
[65] Fix | Delete
__fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
[66] Fix | Delete
# define __FDS_BITS(set) ((set)->__fds_bits)
[67] Fix | Delete
#endif
[68] Fix | Delete
} fd_set;
[69] Fix | Delete
[70] Fix | Delete
/* Maximum number of file descriptors in `fd_set'. */
[71] Fix | Delete
#define FD_SETSIZE __FD_SETSIZE
[72] Fix | Delete
[73] Fix | Delete
#ifdef __USE_MISC
[74] Fix | Delete
/* Sometimes the fd_set member is assumed to have this type. */
[75] Fix | Delete
typedef __fd_mask fd_mask;
[76] Fix | Delete
[77] Fix | Delete
/* Number of bits per word of `fd_set' (some code assumes this is 32). */
[78] Fix | Delete
# define NFDBITS __NFDBITS
[79] Fix | Delete
#endif
[80] Fix | Delete
[81] Fix | Delete
[82] Fix | Delete
/* Access macros for `fd_set'. */
[83] Fix | Delete
#define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
[84] Fix | Delete
#define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
[85] Fix | Delete
#define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
[86] Fix | Delete
#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
[87] Fix | Delete
[88] Fix | Delete
[89] Fix | Delete
__BEGIN_DECLS
[90] Fix | Delete
[91] Fix | Delete
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
[92] Fix | Delete
readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
[93] Fix | Delete
(if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
[94] Fix | Delete
after waiting the interval specified therein. Returns the number of ready
[95] Fix | Delete
descriptors, or -1 for errors.
[96] Fix | Delete
[97] Fix | Delete
This function is a cancellation point and therefore not marked with
[98] Fix | Delete
__THROW. */
[99] Fix | Delete
extern int select (int __nfds, fd_set *__restrict __readfds,
[100] Fix | Delete
fd_set *__restrict __writefds,
[101] Fix | Delete
fd_set *__restrict __exceptfds,
[102] Fix | Delete
struct timeval *__restrict __timeout);
[103] Fix | Delete
[104] Fix | Delete
#ifdef __USE_XOPEN2K
[105] Fix | Delete
/* Same as above only that the TIMEOUT value is given with higher
[106] Fix | Delete
resolution and a sigmask which is been set temporarily. This version
[107] Fix | Delete
should be used.
[108] Fix | Delete
[109] Fix | Delete
This function is a cancellation point and therefore not marked with
[110] Fix | Delete
__THROW. */
[111] Fix | Delete
extern int pselect (int __nfds, fd_set *__restrict __readfds,
[112] Fix | Delete
fd_set *__restrict __writefds,
[113] Fix | Delete
fd_set *__restrict __exceptfds,
[114] Fix | Delete
const struct timespec *__restrict __timeout,
[115] Fix | Delete
const __sigset_t *__restrict __sigmask);
[116] Fix | Delete
#endif
[117] Fix | Delete
[118] Fix | Delete
[119] Fix | Delete
/* Define some inlines helping to catch common problems. */
[120] Fix | Delete
#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__
[121] Fix | Delete
# include <bits/select2.h>
[122] Fix | Delete
#endif
[123] Fix | Delete
[124] Fix | Delete
__END_DECLS
[125] Fix | Delete
[126] Fix | Delete
#endif /* sys/select.h */
[127] Fix | Delete
[128] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function