diff options
Diffstat (limited to 'harness/include')
-rw-r--r-- | harness/include/foreign_intf.h | 2 | ||||
-rw-r--r-- | harness/include/plugin.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/harness/include/foreign_intf.h b/harness/include/foreign_intf.h index fc079e2..e0d178c 100644 --- a/harness/include/foreign_intf.h +++ b/harness/include/foreign_intf.h @@ -21,6 +21,8 @@ typedef struct FOREIGN_INTERFACE { /* Requests the harness hot reload the current plugin. */ EXPORT(void (*do_log)(ctx_t ctx, const char* str)); + /* Requestes that the whole system exit. Exits with the given return code. */ + EXPORT(void (*request_exit)(ctx_t ctx, int rc)); } foreign_interface_t; #undef EXPORT diff --git a/harness/include/plugin.h b/harness/include/plugin.h index 1e4a161..145fe52 100644 --- a/harness/include/plugin.h +++ b/harness/include/plugin.h @@ -33,7 +33,11 @@ struct PLUGIN; typedef struct { int (*action)(struct PLUGIN *requester, void* arg); void (*arg_dtor)(void* arg); - void* arg; + union { + void* ptr_arg; + int int_arg; + char* str_arg; + }; } requested_action_t; /* |