]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/sys/fd_set.h
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / StdLib / Include / sys / fd_set.h
diff --git a/StdLib/Include/sys/fd_set.h b/StdLib/Include/sys/fd_set.h
deleted file mode 100644 (file)
index acbfbf0..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*  $NetBSD: fd_set.h,v 1.2 2005/12/11 12:25:20 christos Exp $  */\r
-\r
-/*-\r
- * Copyright (c) 1992, 1993\r
- *  The Regents of the University of California.  All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- *    may be used to endorse or promote products derived from this software\r
- *    without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- *\r
- *  from: @(#)types.h 8.4 (Berkeley) 1/21/94\r
- */\r
-\r
-#ifndef _SYS_FD_SET_H_\r
-#define _SYS_FD_SET_H_\r
-\r
-#include  <sys/EfiCdefs.h>\r
-#include  <machine/int_types.h>\r
-\r
-/*\r
- * Implementation dependent defines, hidden from user space. X/Open does not\r
- * specify them.\r
- */\r
-#define __NBBY    8   /* number of bits in a byte */\r
-typedef __int32_t __fd_mask;\r
-\r
-/* bits per mask */\r
-#define __NFDBITS ((unsigned int)sizeof(__fd_mask) * __NBBY)\r
-\r
-#define __howmany(x, y) (((x) + ((y) - 1)) / (y))\r
-\r
-/*\r
- * Select uses bit masks of file descriptors in longs.  These macros\r
- * manipulate such bit fields (the filesystem macros use chars).\r
- * FD_SETSIZE may be defined by the user, but the default here should\r
- * be enough for most uses.\r
- */\r
-#ifndef FD_SETSIZE\r
-#define FD_SETSIZE  256\r
-#endif\r
-\r
-typedef struct fd_set {\r
-  __fd_mask fds_bits[__howmany(FD_SETSIZE, __NFDBITS)];\r
-} fd_set;\r
-\r
-#define FD_SET(n, p)  \\r
-    ((p)->fds_bits[(n)/__NFDBITS] |= (1 << ((n) % __NFDBITS)))\r
-#define FD_CLR(n, p)  \\r
-    ((p)->fds_bits[(n)/__NFDBITS] &= ~(1 << ((n) % __NFDBITS)))\r
-#define FD_ISSET(n, p)  \\r
-    ((p)->fds_bits[(n)/__NFDBITS] & (1 << ((n) % __NFDBITS)))\r
-#if __GNUC_PREREQ__(2, 95)\r
-#define FD_ZERO(p)  (void)__builtin_memset((p), 0, sizeof(*(p)))\r
-#else\r
-#define FD_ZERO(p)  do {            \\r
-  fd_set *__fds = (p);            \\r
-  unsigned int __i;           \\r
-  for (__i = 0; __i < __howmany(FD_SETSIZE, __NFDBITS); __i++)  \\r
-    __fds->fds_bits[__i] = 0;       \\r
-  } while (/* CONSTCOND */ 0)\r
-#endif /* GCC 2.95 */\r
-\r
-/*\r
- * Expose our internals if we are not required to hide them.\r
- */\r
-#if defined(_NETBSD_SOURCE)\r
-\r
-#define fd_mask __fd_mask\r
-#define NFDBITS __NFDBITS\r
-#ifndef howmany\r
-#define howmany(a, b) __howmany(a, b)\r
-#endif\r
-\r
-#if __GNUC_PREREQ__(2, 95)\r
-#define FD_COPY(f, t) (void)__builtin_memcpy((t), (f), sizeof(*(f)))\r
-#else\r
-#define FD_COPY(f, t) do {            \\r
-  fd_set *__f = (f), *__t = (t);          \\r
-  unsigned int __i;           \\r
-  for (__i = 0; __i < __howmany(FD_SETSIZE, __NFDBITS); __i++)  \\r
-    __t->fds_bits[__i] = __f->fds_bits[__i];    \\r
-  } while (/* CONSTCOND */ 0)\r
-#endif /* GCC 2.95 */\r
-\r
-#endif /* _NETBSD_SOURCE */\r
-\r
-#endif /* _SYS_FD_SET_H_ */\r