OLD | NEW |
(Empty) | |
| 1 This is a port of libevent (an event notification library) to nacl platfrom. |
| 2 For details visit : http://libevent.org |
| 3 |
| 4 The library is "functional" albeit with some issues, this documents lists and |
| 5 keep tracks all those. |
| 6 |
| 7 Issue #1 |
| 8 Callbacks due to signals are NOT supported. |
| 9 Reason: nacl.io do not support POSIX signals. |
| 10 Details : sigaction(...) and signal(...) are not(yet) implemented on nacl.io, |
| 11 thus the calls evsignal_add,evsignal_del,evsignal_pending should be avoided, |
| 12 also event_add/event_del when passed with EV_SIGNAL will also fail. |
| 13 |
| 14 For details about these functions visit : |
| 15 http://www.wangafu.net/~nickm/libevent-book/Ref4_event.html |
| 16 |
| 17 See /samples/hello-world.c for more details. |
| 18 To check if everything is working fine, run hello-world.nexe in nacl-devenv |
| 19 extension and point your browser to localhost:9995 and you should see "hello |
| 20 world". |
| 21 |
| 22 To debug/see implementation |
| 23 Look for /event.c, /signal.c and /evmap.c |
| 24 In /signal.c see function _evsig_set_handler and _evsig_restore_handler |
| 25 |
| 26 Typical function call |
| 27 event_add > event_add_internal > (if signal) evmap_signal_add > evsig_add |
| 28 |
| 29 Issue #2 |
| 30 Post build tests are skipped. |
| 31 Reason : setitimer and getitimer not available in newlib. |
| 32 |
| 33 Issue #3 |
| 34 Build against glibc is not functional, ie either static linking fails or |
| 35 sometimes ELF header error pops up |
| 36 Reason : unknown (issue deprioritized) |
| 37 |
| 38 Note |
| 39 1.Code in /samples/ (except hello-world.c) is not yet tested (or not yet |
| 40 modified to work on nacl platform) |
| 41 2.Libevnt uses socketpair(...) extensively, however the same is not |
| 42 implemented on nacl, thus custom implementation is used, to see details |
| 43 look for evutil_ersatz_socketpair(...) in /evutil.c |
OLD | NEW |