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

Comparing libev/ev.pod (file contents):
Revision 1.167 by root, Mon Jun 9 14:11:30 2008 UTC vs.
Revision 1.170 by root, Sat Jul 5 02:25:40 2008 UTC

1662will be no polling. 1662will be no polling.
1663 1663
1664=head3 ABI Issues (Largefile Support) 1664=head3 ABI Issues (Largefile Support)
1665 1665
1666Libev by default (unless the user overrides this) uses the default 1666Libev by default (unless the user overrides this) uses the default
1667compilation environment, which means that on systems with optionally 1667compilation environment, which means that on systems with large file
1668disabled large file support, you get the 32 bit version of the stat 1668support disabled by default, you get the 32 bit version of the stat
1669structure. When using the library from programs that change the ABI to 1669structure. When using the library from programs that change the ABI to
1670use 64 bit file offsets the programs will fail. In that case you have to 1670use 64 bit file offsets the programs will fail. In that case you have to
1671compile libev with the same flags to get binary compatibility. This is 1671compile libev with the same flags to get binary compatibility. This is
1672obviously the case with any flags that change the ABI, but the problem is 1672obviously the case with any flags that change the ABI, but the problem is
1673most noticeably with ev_stat and large file support. 1673most noticeably disabled with ev_stat and large file support.
1674
1675The solution for this is to lobby your distribution maker to make large
1676file interfaces available by default (as e.g. FreeBSD does) and not
1677optional. Libev cannot simply switch on large file support because it has
1678to exchange stat structures with application programs compiled using the
1679default compilation environment.
1674 1680
1675=head3 Inotify 1681=head3 Inotify
1676 1682
1677When C<inotify (7)> support has been compiled into libev (generally only 1683When C<inotify (7)> support has been compiled into libev (generally only
1678available on Linux) and present at runtime, it will be used to speed up 1684available on Linux) and present at runtime, it will be used to speed up
3182parallel from multiple threads, calls with the same loop parameter must be 3188parallel from multiple threads, calls with the same loop parameter must be
3183done serially (but can be done from different threads, as long as only one 3189done serially (but can be done from different threads, as long as only one
3184thread ever is inside a call at any point in time, e.g. by using a mutex 3190thread ever is inside a call at any point in time, e.g. by using a mutex
3185per loop). 3191per loop).
3186 3192
3187If you want to know which design is best for your problem, then I cannot 3193If you want to know which design (one loop, locking, or multiple loops
3188help you but by giving some generic advice: 3194without or something else still) is best for your problem, then I cannot
3195help you. I can give some generic advice however:
3189 3196
3190=over 4 3197=over 4
3191 3198
3192=item * most applications have a main thread: use the default libev loop 3199=item * most applications have a main thread: use the default libev loop
3193in that thread, or create a separate thread running only the default loop. 3200in that thread, or create a separate thread running only the default loop.
3332section for details) and use the following F<evwrap.h> header file instead 3339section for details) and use the following F<evwrap.h> header file instead
3333of F<ev.h>: 3340of F<ev.h>:
3334 3341
3335 #define EV_STANDALONE /* keeps ev from requiring config.h */ 3342 #define EV_STANDALONE /* keeps ev from requiring config.h */
3336 #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */ 3343 #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */
3337 #define EV_STAT_ENABLE 0 /* no stat() availble */
3338 3344
3339 #include "ev.h" 3345 #include "ev.h"
3340 3346
3341And compile the following F<evwrap.c> file into your project (make sure 3347And compile the following F<evwrap.c> file into your project (make sure
3342you do I<not> compile the F<ev.c> or any other embedded soruce files!): 3348you do I<not> compile the F<ev.c> or any other embedded soruce files!):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines