plugin: Update list of available events for I/O plugins

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-11-12 02:47:33 +01:00
parent c82dc54205
commit 168da2a5c6
2 changed files with 15 additions and 3 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
/* Plugin based services architecture for finit
*
* Copyright (c) 2012 Joachim Nilsson <troglobit@gmail.com>
* Copyright (c) 2012-2017 Joachim Nilsson <troglobit@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -194,7 +194,11 @@ void plugin_run_hooks(hook_point_t no)
plugin_run_hook(no, NULL);
}
/* Generic libev I/O callback, looks up correct plugin and calls its callback */
/*
* Generic libev I/O callback, looks up correct plugin and calls its
* callback. libuEv might return UEV_ERROR in events, it is up to the
* plugin callback to handle this.
*/
static void generic_io_cb(uev_t *w, void *arg, int events)
{
plugin_t *p = (plugin_t *)arg;
+9 -1
View File
@@ -1,6 +1,6 @@
/* Plugin based services architecture for finit
*
* Copyright (c) 2012 Joachim Nilsson <troglobit@gmail.com>
* Copyright (c) 2012-2017 Joachim Nilsson <troglobit@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -34,8 +34,16 @@
#endif
#define PLUGIN_DEP_MAX 10
/*
* Event flags for I/O plugins
*/
#define PLUGIN_IO_ERROR UEV_ERROR
#define PLUGIN_IO_READ UEV_READ
#define PLUGIN_IO_WRITE UEV_WRITE
#define PLUGIN_IO_PRI UEV_PRI
#define PLUGIN_IO_HUP UEV_HUP
#define PLUGIN_IO_RDHUP UEV_RDHUP
#define PLUGIN_INIT(x) static void __attribute__ ((constructor)) x(void)
#define PLUGIN_EXIT(x) static void __attribute__ ((destructor)) x(void)