Print this page
remove support for non-ANSI compilation


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*


  27  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
  28  * All rights reserved.
  29  */
  30 
  31 #ifndef _SYS_POLL_H
  32 #define _SYS_POLL_H
  33 
  34 #pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 11.9 */
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Structure of file descriptor/event pairs supplied in
  42  * the poll arrays.
  43  */
  44 typedef struct pollfd {
  45         int fd;                         /* file desc to poll */
  46         short events;                   /* events of interest on fd */
  47         short revents;                  /* events that occurred on fd */
  48 } pollfd_t;
  49 
  50 typedef unsigned long   nfds_t;
  51 
  52 /*
  53  * Testable select events
  54  */
  55 #define POLLIN          0x0001          /* fd is readable */


 121  */
 122 extern void polllock(pollhead_t *, kmutex_t *);
 123 extern int pollunlock(void);
 124 extern void pollrelock(int);
 125 extern void pollcleanup(void);
 126 extern void pollblockexit(struct fpollinfo *);
 127 extern void pollcacheclean(struct fpollinfo *, int);
 128 
 129 /*
 130  * public poll head interface:
 131  *
 132  *  pollhead_clean      clean up all polldats on a pollhead list
 133  */
 134 extern void pollhead_clean(pollhead_t *);
 135 
 136 #endif /* defined(_KERNEL) */
 137 
 138 #endif /* defined(_KERNEL) || defined(_KMEMUSER) */
 139 
 140 #if !defined(_KERNEL)
 141 #if defined(__STDC__)
 142 int poll(struct pollfd *, nfds_t, int);
 143 #else
 144 int poll();
 145 #endif /* __STDC__ */
 146 #endif /* !_KERNEL */
 147 
 148 #ifdef  __cplusplus
 149 }
 150 #endif
 151 
 152 #endif  /* _SYS_POLL_H */


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  28  *
  29  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
  30  * All rights reserved.
  31  */
  32 
  33 #ifndef _SYS_POLL_H
  34 #define _SYS_POLL_H
  35 


  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Structure of file descriptor/event pairs supplied in
  42  * the poll arrays.
  43  */
  44 typedef struct pollfd {
  45         int fd;                         /* file desc to poll */
  46         short events;                   /* events of interest on fd */
  47         short revents;                  /* events that occurred on fd */
  48 } pollfd_t;
  49 
  50 typedef unsigned long   nfds_t;
  51 
  52 /*
  53  * Testable select events
  54  */
  55 #define POLLIN          0x0001          /* fd is readable */


 121  */
 122 extern void polllock(pollhead_t *, kmutex_t *);
 123 extern int pollunlock(void);
 124 extern void pollrelock(int);
 125 extern void pollcleanup(void);
 126 extern void pollblockexit(struct fpollinfo *);
 127 extern void pollcacheclean(struct fpollinfo *, int);
 128 
 129 /*
 130  * public poll head interface:
 131  *
 132  *  pollhead_clean      clean up all polldats on a pollhead list
 133  */
 134 extern void pollhead_clean(pollhead_t *);
 135 
 136 #endif /* defined(_KERNEL) */
 137 
 138 #endif /* defined(_KERNEL) || defined(_KMEMUSER) */
 139 
 140 #if !defined(_KERNEL)

 141 int poll(struct pollfd *, nfds_t, int);



 142 #endif /* !_KERNEL */
 143 
 144 #ifdef  __cplusplus
 145 }
 146 #endif
 147 
 148 #endif  /* _SYS_POLL_H */