]>
Commit | Line | Data |
---|---|---|
53e1e5c6 | 1 | /** @file\r |
2 | Definitions in support of the poll() function.\r | |
3 | \r | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc.\r | |
5 | * All rights reserved.\r | |
6 | *\r | |
7 | * This code is derived from software contributed to The NetBSD Foundation\r | |
8 | * by Charles M. Hannum.\r | |
9 | *\r | |
10 | * Redistribution and use in source and binary forms, with or without\r | |
11 | * modification, are permitted provided that the following conditions\r | |
12 | * are met:\r | |
13 | * 1. Redistributions of source code must retain the above copyright\r | |
14 | * notice, this list of conditions and the following disclaimer.\r | |
15 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
16 | * notice, this list of conditions and the following disclaimer in the\r | |
17 | * documentation and/or other materials provided with the distribution.\r | |
18 | * 3. All advertising materials mentioning features or use of this software\r | |
19 | * must display the following acknowledgement:\r | |
20 | * This product includes software developed by the NetBSD\r | |
21 | * Foundation, Inc. and its contributors.\r | |
22 | * 4. Neither the name of The NetBSD Foundation nor the names of its\r | |
23 | * contributors may be used to endorse or promote products derived\r | |
24 | * from this software without specific prior written permission.\r | |
25 | *\r | |
26 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\r | |
27 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\r | |
28 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r | |
29 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\r | |
30 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r | |
31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r | |
32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r | |
33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r | |
34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r | |
35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r | |
36 | * POSSIBILITY OF SUCH DAMAGE.\r | |
37 | \r | |
38 | Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
39 | This program and the accompanying materials are licensed and made available under\r | |
40 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
41 | The full text of the license may be found at\r | |
42 | http://opensource.org/licenses/bsd-license.php.\r | |
43 | \r | |
44 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
45 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
46 | \r | |
47 | NetBSD: poll.h,v 1.11 2005/12/11 12:25:20 christos Exp\r | |
48 | **/\r | |
49 | #ifndef _SYS_POLL_H_\r | |
50 | #define _SYS_POLL_H_\r | |
51 | \r | |
52 | #include <sys/featuretest.h>\r | |
53 | #include <sys/EfiCdefs.h>\r | |
54 | \r | |
55 | typedef unsigned int nfds_t;\r | |
56 | \r | |
57 | struct pollfd {\r | |
58 | int fd; /* file descriptor */\r | |
59 | short events; /* events to look for */\r | |
60 | short revents; /* events returned */\r | |
61 | };\r | |
62 | \r | |
63 | /*\r | |
64 | * Testable events (may be specified in events field).\r | |
65 | */\r | |
66 | #define POLLIN 0x0001\r | |
67 | #define POLLPRI 0x0002\r | |
68 | #define POLLOUT 0x0004\r | |
69 | #define POLLRDNORM 0x0040\r | |
70 | #define POLLWRNORM POLLOUT\r | |
71 | #define POLLRDBAND 0x0080\r | |
72 | #define POLLWRBAND 0x0100\r | |
73 | \r | |
74 | /*\r | |
75 | * Non-testable events (ignored in events field, valid in return only).\r | |
76 | */\r | |
77 | #define POLLERR 0x0008\r | |
78 | #define POLLHUP 0x0010\r | |
79 | #define POLLNVAL 0x0020 // Invalid parameter in POLL call\r | |
80 | #define POLL_RETONLY (POLLERR | POLLHUP | POLLNVAL)\r | |
81 | \r | |
82 | /*\r | |
83 | * Infinite timeout value.\r | |
84 | */\r | |
85 | #define INFTIM -1\r | |
86 | \r | |
87 | __BEGIN_DECLS\r | |
88 | int poll(struct pollfd *, nfds_t, int);\r | |
89 | __END_DECLS\r | |
90 | \r | |
91 | #endif /* !_SYS_POLL_H_ */\r |