1.1 --- a/libipc/include/ipc/server.h Sun Jun 05 21:30:59 2022 +0200
1.2 +++ b/libipc/include/ipc/server.h Mon Jun 06 00:36:14 2022 +0200
1.3 @@ -34,6 +34,12 @@
1.4 (ipc_server_handler_type) handle_##TYPE, \
1.5 NAME)
1.6
1.7 +/* A convenience macro for initialising a server. */
1.8 +
1.9 +#define ipc_server_init_for(CONFIG, TYPE, POINTER) \
1.10 + _ipc_server_init_for(CONFIG, TYPE##_expected_items, (TYPE *) POINTER, \
1.11 + (ipc_server_handler_type) handle_##TYPE)
1.12 +
1.13 /* A convenience macro for adding a configuration to an existing server. */
1.14
1.15 #define ipc_server_add_config(CONFIG, TYPE, POINTER, THREAD) \
1.16 @@ -124,6 +130,11 @@
1.17 long _ipc_server_loop_for(int expected_items, void *handler_obj,
1.18 ipc_server_handler_type handler, const char *name);
1.19
1.20 +/* Initialise a server. */
1.21 +
1.22 +long _ipc_server_init_for(ipc_server_config_type *config, int expected_items,
1.23 + void *handler_obj, ipc_server_handler_type handler);
1.24 +
1.25 /* Add handling of incoming messages to an existing server. */
1.26
1.27 long _ipc_server_add_config(ipc_server_config_type *config, int expected_items,
1.28 @@ -160,6 +171,11 @@
1.29
1.30 long ipc_server_start_config(ipc_server_config_type *config);
1.31
1.32 +/* Initialise and start a server using the given configuration and thread. */
1.33 +
1.34 +long ipc_server_start_config_thread(ipc_server_config_type *config,
1.35 + l4_cap_idx_t thread);
1.36 +
1.37 EXTERN_C_END
1.38
1.39 /* vim: tabstop=2 expandtab shiftwidth=2