diff --git a/Changes b/Changes index 2bb3a04..1a8822b 100644 --- a/Changes +++ b/Changes @@ -1,11 +1,7 @@ Revision history for libev, a high-performance and full-featured event loop. TODO: ABI??? API????? Changes??? -TODO: win32 write() to socket for signal handling -TODO: poll asert TODO: EV_USE__XXX default with config, document -TODO: pendingall => idleall? -TODO: portbality section, solaris errno rrentrant, aix, win32, linux 32 bit TODO: include ev_xyz_start in each example? TODO: section watcher states/lifetime - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading. @@ -25,6 +21,7 @@ TODO: section watcher states/lifetime on freebsd...). - configure now prepends -O3, not appends it, so one can still override it. + - greatly expanded the portability section. - disable poll backend on AIX, the poll header spams the namespace and it's not worth working around dead platforms (reported and analyzed by Aivars Kalvans). diff --git a/ev.c b/ev.c index c023764..81bbd88 100644 --- a/ev.c +++ b/ev.c @@ -1283,6 +1283,11 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag) } else #endif + /* win32 people keep sending patches that change this write() to send() */ + /* and then run away. but send() is wrong, it wants a socket handle on win32 */ + /* so when you think this write should be a send instead, please find out */ + /* where your send() is from - it's definitely not the microsoft send, and */ + /* tell me. thank you. */ write (evpipe [1], &dummy, 1); errno = old_errno; @@ -1306,6 +1311,7 @@ pipecb (EV_P_ ev_io *iow, int revents) #endif { char dummy; + /* see discussion in evpipe_write when you think this read should be recv in win32 */ read (evpipe [0], &dummy, 1); } diff --git a/ev.pod b/ev.pod index 5f65061..406d3ca 100644 --- a/ev.pod +++ b/ev.pod @@ -2967,7 +2967,7 @@ handlers will be invoked, too, of course. =head3 The special problem of life after fork - how is it possible? -Most uses of C consist of forking, then some simple calls to ste +Most uses of C consist of forking, then some simple calls to set up/change the process environment, followed by a call to C. This sequence should be handled by libev without any problems. @@ -3011,17 +3011,16 @@ believe me. =back -=head2 C - how to wake up another event loop +=head2 C - how to wake up an event loop In general, you cannot use an C from multiple threads or other asynchronous sources such as signal handlers (as opposed to multiple event loops - those are of course safe to use in different threads). -Sometimes, however, you need to wake up another event loop you do not -control, for example because it belongs to another thread. This is what -C watchers do: as long as the C watcher is active, you -can signal it by calling C, which is thread- and signal -safe. +Sometimes, however, you need to wake up an event loop you do not control, +for example because it belongs to another thread. This is what C +watchers do: as long as the C watcher is active, you can signal +it by calling C, which is thread- and signal safe. This functionality is very similar to C watchers, as signals, too, are asynchronous in nature, and signals, too, will be compressed @@ -4399,19 +4398,106 @@ I suggest using suppression lists. =head1 PORTABILITY NOTES +=head2 GNU/LINUX 32 BIT LIMITATIONS + +GNU/Linux is the only common platform that supports 64 bit file/large file +interfaces but I them by default. + +That means that libev compiled in the default environment doesn't support +files larger than 2GiB or so, which mainly affects C watchers. + +Unfortunately, many programs try to work around this GNU/Linux issue +by enabling the large file API, which makes them incompatible with the +standard libev compiled for their system. + +Likewise, libev cannot enable the large file API itself as this would +suddenly make it incompatible to the default compile time environment, +i.e. all programs not using special compile switches. + +=head2 OS/X AND DARWIN BUGS + +The whole thing is a bug if you ask me - basically any system interface +you touch is broken, whether it is locales, poll, kqueue or even the +OpenGL drivers. + +=head3 C is buggy + +The kqueue syscall is broken in all known versions - most versions support +only sockets, many support pipes. + +Libev tries to work around this by not using C by default on +this rotten platform, but of course you can still ask for it when creating +a loop. + +=head3 C is buggy + +Instead of fixing C, Apple replaced their (working) C +implementation by something calling C internally around the 10.5.6 +release, so now C I C are broken. + +Libev tries to work around this by not using C by default on +this rotten platform, but of course you can still ask for it when creating +a loop. + +=head3 C, and of course Apple found a way to fuck this +one up as well: On OS/X, C backends. + +=head2 AIX POLL BUG + +AIX unfortunately has a broken C header. Libev works around +this by trying to avoid the poll backend altogether (i.e. it's not even +compiled in), which normally isn't a big problem as C function The winsocket C