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

Comparing libev/ev.3 (file contents):
Revision 1.30 by root, Wed Nov 28 11:27:29 2007 UTC vs.
Revision 1.32 by root, Wed Nov 28 17:32:24 2007 UTC

210watchers\fR, which are relatively small C structures you initialise with the 210watchers\fR, which are relatively small C structures you initialise with the
211details of the event, and then hand it over to libev by \fIstarting\fR the 211details of the event, and then hand it over to libev by \fIstarting\fR the
212watcher. 212watcher.
213.SH "FEATURES" 213.SH "FEATURES"
214.IX Header "FEATURES" 214.IX Header "FEATURES"
215Libev supports \f(CW\*(C`select\*(C'\fR, \f(CW\*(C`poll\*(C'\fR, the linux-specific \f(CW\*(C`epoll\*(C'\fR, the 215Libev supports \f(CW\*(C`select\*(C'\fR, \f(CW\*(C`poll\*(C'\fR, the Linux-specific \f(CW\*(C`epoll\*(C'\fR, the
216bsd-specific \f(CW\*(C`kqueue\*(C'\fR and the solaris-specific event port mechanisms 216BSD-specific \f(CW\*(C`kqueue\*(C'\fR and the Solaris-specific event port mechanisms
217for file descriptor events (\f(CW\*(C`ev_io\*(C'\fR), relative timers (\f(CW\*(C`ev_timer\*(C'\fR), 217for file descriptor events (\f(CW\*(C`ev_io\*(C'\fR), the Linux \f(CW\*(C`inotify\*(C'\fR interface
218(for \f(CW\*(C`ev_stat\*(C'\fR), relative timers (\f(CW\*(C`ev_timer\*(C'\fR), absolute timers
218absolute timers with customised rescheduling (\f(CW\*(C`ev_periodic\*(C'\fR), synchronous 219with customised rescheduling (\f(CW\*(C`ev_periodic\*(C'\fR), synchronous signals
219signals (\f(CW\*(C`ev_signal\*(C'\fR), process status change events (\f(CW\*(C`ev_child\*(C'\fR), and 220(\f(CW\*(C`ev_signal\*(C'\fR), process status change events (\f(CW\*(C`ev_child\*(C'\fR), and event
220event watchers dealing with the event loop mechanism itself (\f(CW\*(C`ev_idle\*(C'\fR, 221watchers dealing with the event loop mechanism itself (\f(CW\*(C`ev_idle\*(C'\fR,
221\&\f(CW\*(C`ev_embed\*(C'\fR, \f(CW\*(C`ev_prepare\*(C'\fR and \f(CW\*(C`ev_check\*(C'\fR watchers) as well as 222\&\f(CW\*(C`ev_embed\*(C'\fR, \f(CW\*(C`ev_prepare\*(C'\fR and \f(CW\*(C`ev_check\*(C'\fR watchers) as well as
222file watchers (\f(CW\*(C`ev_stat\*(C'\fR) and even limited support for fork events 223file watchers (\f(CW\*(C`ev_stat\*(C'\fR) and even limited support for fork events
223(\f(CW\*(C`ev_fork\*(C'\fR). 224(\f(CW\*(C`ev_fork\*(C'\fR).
224.PP 225.PP
225It also is quite fast (see this 226It also is quite fast (see this
304might be supported on the current system, you would need to look at 305might be supported on the current system, you would need to look at
305\&\f(CW\*(C`ev_embeddable_backends () & ev_supported_backends ()\*(C'\fR, likewise for 306\&\f(CW\*(C`ev_embeddable_backends () & ev_supported_backends ()\*(C'\fR, likewise for
306recommended ones. 307recommended ones.
307.Sp 308.Sp
308See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info. 309See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info.
309.IP "ev_set_allocator (void *(*cb)(void *ptr, size_t size))" 4 310.IP "ev_set_allocator (void *(*cb)(void *ptr, long size))" 4
310.IX Item "ev_set_allocator (void *(*cb)(void *ptr, size_t size))" 311.IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size))"
311Sets the allocation function to use (the prototype and semantics are 312Sets the allocation function to use (the prototype is similar \- the
312identical to the realloc C function). It is used to allocate and free 313semantics is identical \- to the realloc C function). It is used to
313memory (no surprises here). If it returns zero when memory needs to be 314allocate and free memory (no surprises here). If it returns zero when
314allocated, the library might abort or take some potentially destructive 315memory needs to be allocated, the library might abort or take some
315action. The default is your system realloc function. 316potentially destructive action. The default is your system realloc
317function.
316.Sp 318.Sp
317You could override this function in high-availability programs to, say, 319You could override this function in high-availability programs to, say,
318free some memory if it cannot allocate memory, to use a special allocator, 320free some memory if it cannot allocate memory, to use a special allocator,
319or even to sleep a while and retry until some memory is available. 321or even to sleep a while and retry until some memory is available.
320.Sp 322.Sp

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines