mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
plugin: Update list of available events for I/O plugins
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
c82dc54205
commit
168da2a5c6
2 files changed
+15
-3
No files matched your search
+6
-2
@@ -1,6 +1,6 @@
|
|||||||
/* Plugin based services architecture for finit
|
/* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* 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);
|
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)
|
static void generic_io_cb(uev_t *w, void *arg, int events)
|
||||||
{
|
{
|
||||||
plugin_t *p = (plugin_t *)arg;
|
plugin_t *p = (plugin_t *)arg;
|
||||||
|
|||||||
+9
-1
@@ -1,6 +1,6 @@
|
|||||||
/* Plugin based services architecture for finit
|
/* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -34,8 +34,16 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PLUGIN_DEP_MAX 10
|
#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_READ UEV_READ
|
||||||
#define PLUGIN_IO_WRITE UEV_WRITE
|
#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_INIT(x) static void __attribute__ ((constructor)) x(void)
|
||||||
#define PLUGIN_EXIT(x) static void __attribute__ ((destructor)) x(void)
|
#define PLUGIN_EXIT(x) static void __attribute__ ((destructor)) x(void)
|
||||||
|
|||||||
Reference in new issue
Block a user