Print this page
11622 clean up rarer mandoc lint warnings
   1 '\" te
   2 .\"  Copyright (c) 2014, Joyent, Inc. All Rights Reserved.
   3 .\"  This file and its contents are supplied under the terms of the
   4 .\"  Common Development and Distribution License ("CDDL"), version 1.0.
   5 .\"  You may only use this file in accordance with the terms of version
   6 .\"  1.0 of the CDDL.
   7 .\"
   8 .\"  A full copy of the text of the CDDL should have accompanied this
   9 .\"  source.  A copy of the CDDL is also available via the Internet at
  10 .\"  http://www.illumos.org/license/CDDL.
  11 .TH EPOLL_CTL 3C "April 9, 2016"
  12 .SH NAME
  13 epoll_ctl \- control an epoll instance
  14 .SH SYNOPSIS
  15 
  16 .LP
  17 .nf
  18 #include <sys/epoll.h>
  19 
  20 \fBint\fR \fBepoll_ctl\fR(\fBint\fR \fIepfd\fR, \fBint\fR \fIop\fR, \fBint\fR \fIfd\fR, \fBstruct epoll_event *\fR\fIevent\fR);
  21 .fi
  22 
  23 .SH DESCRIPTION
  24 .LP
  25 The \fBepoll_ctl()\fR function executes the operation specified by
  26 \fIop\fR (as parameterized by \fIevent\fR) on the \fIepfd\fR epoll instance.
  27 Valid values for \fIop\fR:
  28 
  29 .sp
  30 .ne 2
  31 .na
  32 \fBEPOLL_CTL_ADD\fR
  33 .ad
  34 .RS 12n
  35 For the \fBepoll\fR(5) instance specified by \fIepfd\fR,
  36 associate the file descriptor specified by \fIfd\fR with the event specified
  37 by \fIevent\fR.
  38 .RE
  39 
  40 .sp
  41 .ne 2
  42 .na
  43 \fBEPOLL_CTL_DEL\fR
  44 .ad


 227 as the event is returned via \fBepoll_wait\fR(3C).  Use of this mode allows
 228 for resolution of some of the
 229 races inherent in multithreaded use of \fBepoll_wait\fR(3C).
 230 .RE
 231 
 232 .sp
 233 .ne 2
 234 .na
 235 \fBEPOLLET\fR
 236 .ad
 237 .RS 14n
 238 Sets the specified event to be edge-triggered mode instead of the default
 239 mode of level-triggered.  In this mode, events will be induced by
 240 transitions on an event source rather than the state of the event source.
 241 While perhaps superficially appealing, this mode introduces several new
 242 potential failure modes for user-level software and should be used
 243 with caution.
 244 .RE
 245 
 246 .SH RETURN VALUES
 247 .LP
 248 Upon successful completion, \fBepoll_ctl()\fR returns 0.
 249 If an error occurs, -1 is returned and errno is set to indicate
 250 the error.
 251 
 252 .SH ERRORS
 253 .LP
 254 \fBepoll_ctl()\fR will fail if:
 255 .sp
 256 .ne 2
 257 .na
 258 \fB\fBEBADF\fR\fR
 259 .ad
 260 .RS 10n
 261 \fIepfd\fR is not a valid file descriptor.
 262 .RE
 263 
 264 .sp
 265 .ne 2
 266 .na
 267 \fB\fBEFAULT\fR\fR
 268 .ad
 269 .RS 10n
 270 The memory associated with \fIevent\fR was not mapped.
 271 .RE
 272 
 273 .sp


 277 .ad
 278 .RS 10n
 279 The operation specified was \fBEPOLL_CTL_ADD\fR and the specified file
 280 descriptor is already associated with an event for the specified
 281 \fBepoll\fR(5) instance.
 282 .RE
 283 
 284 .sp
 285 .ne 2
 286 .na
 287 \fB\fBENOENT\fR\fR
 288 .ad
 289 .RS 10n
 290 The operation specified was \fBEPOLL_CTL_MOD\fR or \fBEPOLL_CTL_DEL\fR and
 291 the specified file descriptor is not associated with an event for the
 292 specified \fBepoll\fR(5) instance.
 293 .RE
 294 
 295 .sp
 296 .SH NOTES
 297 .LP
 298 
 299 The \fBepoll\fR(5) facility is implemented for purposes of offering
 300 compatibility for Linux-borne applications; native
 301 applications should continue to prefer using event ports via the
 302 \fBport_create\fR(3C), \fBport_associate\fR(3C) and \fBport_get\fR(3C)
 303 interfaces.  See \fBepoll\fR(5) for compatibility details and restrictions.
 304 
 305 .SH SEE ALSO
 306 .LP
 307 \fBepoll_create\fR(3C), \fBepoll_wait\fR(3C),
 308 \fBport_create\fR(3C), \fBport_associate\fR(3C), \fBport_get\fR(3C),
 309 \fBepoll\fR(5)
   1 '\" te
   2 .\"  Copyright (c) 2014, Joyent, Inc. All Rights Reserved.
   3 .\"  This file and its contents are supplied under the terms of the
   4 .\"  Common Development and Distribution License ("CDDL"), version 1.0.
   5 .\"  You may only use this file in accordance with the terms of version
   6 .\"  1.0 of the CDDL.
   7 .\"
   8 .\"  A full copy of the text of the CDDL should have accompanied this
   9 .\"  source.  A copy of the CDDL is also available via the Internet at
  10 .\"  http://www.illumos.org/license/CDDL.
  11 .TH EPOLL_CTL 3C "April 9, 2016"
  12 .SH NAME
  13 epoll_ctl \- control an epoll instance
  14 .SH SYNOPSIS


  15 .nf
  16 #include <sys/epoll.h>
  17 
  18 \fBint\fR \fBepoll_ctl\fR(\fBint\fR \fIepfd\fR, \fBint\fR \fIop\fR, \fBint\fR \fIfd\fR, \fBstruct epoll_event *\fR\fIevent\fR);
  19 .fi
  20 
  21 .SH DESCRIPTION

  22 The \fBepoll_ctl()\fR function executes the operation specified by
  23 \fIop\fR (as parameterized by \fIevent\fR) on the \fIepfd\fR epoll instance.
  24 Valid values for \fIop\fR:
  25 
  26 .sp
  27 .ne 2
  28 .na
  29 \fBEPOLL_CTL_ADD\fR
  30 .ad
  31 .RS 12n
  32 For the \fBepoll\fR(5) instance specified by \fIepfd\fR,
  33 associate the file descriptor specified by \fIfd\fR with the event specified
  34 by \fIevent\fR.
  35 .RE
  36 
  37 .sp
  38 .ne 2
  39 .na
  40 \fBEPOLL_CTL_DEL\fR
  41 .ad


 224 as the event is returned via \fBepoll_wait\fR(3C).  Use of this mode allows
 225 for resolution of some of the
 226 races inherent in multithreaded use of \fBepoll_wait\fR(3C).
 227 .RE
 228 
 229 .sp
 230 .ne 2
 231 .na
 232 \fBEPOLLET\fR
 233 .ad
 234 .RS 14n
 235 Sets the specified event to be edge-triggered mode instead of the default
 236 mode of level-triggered.  In this mode, events will be induced by
 237 transitions on an event source rather than the state of the event source.
 238 While perhaps superficially appealing, this mode introduces several new
 239 potential failure modes for user-level software and should be used
 240 with caution.
 241 .RE
 242 
 243 .SH RETURN VALUES

 244 Upon successful completion, \fBepoll_ctl()\fR returns 0.
 245 If an error occurs, -1 is returned and errno is set to indicate
 246 the error.
 247 
 248 .SH ERRORS

 249 \fBepoll_ctl()\fR will fail if:
 250 .sp
 251 .ne 2
 252 .na
 253 \fB\fBEBADF\fR\fR
 254 .ad
 255 .RS 10n
 256 \fIepfd\fR is not a valid file descriptor.
 257 .RE
 258 
 259 .sp
 260 .ne 2
 261 .na
 262 \fB\fBEFAULT\fR\fR
 263 .ad
 264 .RS 10n
 265 The memory associated with \fIevent\fR was not mapped.
 266 .RE
 267 
 268 .sp


 272 .ad
 273 .RS 10n
 274 The operation specified was \fBEPOLL_CTL_ADD\fR and the specified file
 275 descriptor is already associated with an event for the specified
 276 \fBepoll\fR(5) instance.
 277 .RE
 278 
 279 .sp
 280 .ne 2
 281 .na
 282 \fB\fBENOENT\fR\fR
 283 .ad
 284 .RS 10n
 285 The operation specified was \fBEPOLL_CTL_MOD\fR or \fBEPOLL_CTL_DEL\fR and
 286 the specified file descriptor is not associated with an event for the
 287 specified \fBepoll\fR(5) instance.
 288 .RE
 289 
 290 .sp
 291 .SH NOTES


 292 The \fBepoll\fR(5) facility is implemented for purposes of offering
 293 compatibility for Linux-borne applications; native
 294 applications should continue to prefer using event ports via the
 295 \fBport_create\fR(3C), \fBport_associate\fR(3C) and \fBport_get\fR(3C)
 296 interfaces.  See \fBepoll\fR(5) for compatibility details and restrictions.
 297 
 298 .SH SEE ALSO

 299 \fBepoll_create\fR(3C), \fBepoll_wait\fR(3C),
 300 \fBport_create\fR(3C), \fBport_associate\fR(3C), \fBport_get\fR(3C),
 301 \fBepoll\fR(5)