uev.h: Remind hardcore devs about checking common errors in callback

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-11-14 12:56:39 +01:00
parent 84661a1b12
commit fbcd200fd5
+5
View File
@@ -66,6 +66,11 @@ typedef struct uev {
* Generic callback for watchers, @events holds %UEV_READ and/or %UEV_WRITE
* with optional %UEV_PRI (priority data available to read) and any of the
* %UEV_HUP and/or %UEV_RDHUP, which may be used to signal hang-up events.
*
* Note: UEV_ERROR conditions must be handled by all callbacks!
* I/O watchers may also need to check UEV_HUP. Appropriate action,
* e.g. restart the watcher, is up to the application and is thus
* delegated to the callback.
*/
typedef void (uev_cb_t)(uev_t *w, void *arg, int events);