ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.3
(Generate patch)

Comparing libev/ev.3 (file contents):
Revision 1.105 by root, Thu Feb 18 04:48:05 2016 UTC vs.
Revision 1.108 by root, Sat Jul 28 04:15:15 2018 UTC

1.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30) 1.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
2.\" 2.\"
3.\" Standard preamble: 3.\" Standard preamble:
4.\" ======================================================================== 4.\" ========================================================================
5.de Sp \" Vertical space (when we can't use .PP) 5.de Sp \" Vertical space (when we can't use .PP)
6.if t .sp .5v 6.if t .sp .5v
131.\} 131.\}
132.rm #[ #] #H #V #F C 132.rm #[ #] #H #V #F C
133.\" ======================================================================== 133.\" ========================================================================
134.\" 134.\"
135.IX Title "LIBEV 3" 135.IX Title "LIBEV 3"
136.TH LIBEV 3 "2016-02-18" "libev-4.22" "libev - high performance full featured event loop" 136.TH LIBEV 3 "2017-11-14" "libev-4.24" "libev - high performance full featured event loop"
137.\" For nroff, turn off justification. Always turn off hyphenation; it makes 137.\" For nroff, turn off justification. Always turn off hyphenation; it makes
138.\" way too many mistakes in technical documents. 138.\" way too many mistakes in technical documents.
139.if n .ad l 139.if n .ad l
140.nh 140.nh
141.SH "NAME" 141.SH "NAME"
536make libev check for a fork in each iteration by enabling this flag. 536make libev check for a fork in each iteration by enabling this flag.
537.Sp 537.Sp
538This works by calling \f(CW\*(C`getpid ()\*(C'\fR on every iteration of the loop, 538This works by calling \f(CW\*(C`getpid ()\*(C'\fR on every iteration of the loop,
539and thus this might slow down your event loop if you do a lot of loop 539and thus this might slow down your event loop if you do a lot of loop
540iterations and little real work, but is usually not noticeable (on my 540iterations and little real work, but is usually not noticeable (on my
541GNU/Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn sequence 541GNU/Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn
542without a system call and thus \fIvery\fR fast, but my GNU/Linux system also has 542sequence without a system call and thus \fIvery\fR fast, but my GNU/Linux
543\&\f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). 543system also has \f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). (Update: glibc
544versions 2.25 apparently removed the \f(CW\*(C`getpid\*(C'\fR optimisation again).
544.Sp 545.Sp
545The big advantage of this flag is that you can forget about fork (and 546The big advantage of this flag is that you can forget about fork (and
546forget about forgetting to tell libev about forking, although you still 547forget about forgetting to tell libev about forking, although you still
547have to ignore \f(CW\*(C`SIGPIPE\*(C'\fR) when you use this flag. 548have to ignore \f(CW\*(C`SIGPIPE\*(C'\fR) when you use this flag.
548.Sp 549.Sp
4521\& ev_vars.h 4522\& ev_vars.h
4522\& ev_wrap.h 4523\& ev_wrap.h
4523\& 4524\&
4524\& ev_win32.c required on win32 platforms only 4525\& ev_win32.c required on win32 platforms only
4525\& 4526\&
4526\& ev_select.c only when select backend is enabled (which is enabled by default) 4527\& ev_select.c only when select backend is enabled
4527\& ev_poll.c only when poll backend is enabled (disabled by default) 4528\& ev_poll.c only when poll backend is enabled
4528\& ev_epoll.c only when the epoll backend is enabled (disabled by default) 4529\& ev_epoll.c only when the epoll backend is enabled
4529\& ev_kqueue.c only when the kqueue backend is enabled (disabled by default) 4530\& ev_kqueue.c only when the kqueue backend is enabled
4530\& ev_port.c only when the solaris port backend is enabled (disabled by default) 4531\& ev_port.c only when the solaris port backend is enabled
4531.Ve 4532.Ve
4532.PP 4533.PP
4533\&\fIev.c\fR includes the backend files directly when enabled, so you only need 4534\&\fIev.c\fR includes the backend files directly when enabled, so you only need
4534to compile this single file. 4535to compile this single file.
4535.PP 4536.PP
5412Libev assumes not only that all watcher pointers have the same internal 5413Libev assumes not only that all watcher pointers have the same internal
5413structure (guaranteed by \s-1POSIX\s0 but not by \s-1ISO C\s0 for example), but it also 5414structure (guaranteed by \s-1POSIX\s0 but not by \s-1ISO C\s0 for example), but it also
5414assumes that the same (machine) code can be used to call any watcher 5415assumes that the same (machine) code can be used to call any watcher
5415callback: The watcher callbacks have different type signatures, but libev 5416callback: The watcher callbacks have different type signatures, but libev
5416calls them using an \f(CW\*(C`ev_watcher *\*(C'\fR internally. 5417calls them using an \f(CW\*(C`ev_watcher *\*(C'\fR internally.
5418.IP "null pointers and integer zero are represented by 0 bytes" 4
5419.IX Item "null pointers and integer zero are represented by 0 bytes"
5420Libev uses \f(CW\*(C`memset\*(C'\fR to initialise structs and arrays to \f(CW0\fR bytes, and
5421relies on this setting pointers and integers to null.
5417.IP "pointer accesses must be thread-atomic" 4 5422.IP "pointer accesses must be thread-atomic" 4
5418.IX Item "pointer accesses must be thread-atomic" 5423.IX Item "pointer accesses must be thread-atomic"
5419Accessing a pointer value must be atomic, it must both be readable and 5424Accessing a pointer value must be atomic, it must both be readable and
5420writable in one piece \- this is the case on all current architectures. 5425writable in one piece \- this is the case on all current architectures.
5421.ie n .IP """sig_atomic_t volatile"" must be thread-atomic as well" 4 5426.ie n .IP """sig_atomic_t volatile"" must be thread-atomic as well" 4

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines