1.1 --- a/libipc/include/ipc/server.h Mon Mar 14 17:44:41 2022 +0100
1.2 +++ b/libipc/include/ipc/server.h Tue Mar 15 17:36:39 2022 +0100
1.3 @@ -117,14 +117,9 @@
1.4 long _ipc_server_loop_for(int expected_items, void *handler_obj,
1.5 ipc_server_handler_type handler, const char *name);
1.6
1.7 -/* Handle incoming messages for a server. */
1.8 -
1.9 -long ipc_server_loop(int expected_items, ipc_server_config_type *config);
1.10 -
1.11 /* Handle incoming messages and IRQ notifications for a server. */
1.12
1.13 -long ipc_server_managed_loop(int expected_items, ipc_server_config_type *config,
1.14 - l4_cap_idx_t irq);
1.15 +long ipc_server_managed_loop(int expected_items, ipc_server_config_type *config);
1.16
1.17 /* A pthread-compatible mainloop initiation function. */
1.18
2.1 --- a/libipc/lib/src/server.c Mon Mar 14 17:44:41 2022 +0100
2.2 +++ b/libipc/lib/src/server.c Tue Mar 15 17:36:39 2022 +0100
2.3 @@ -174,21 +174,13 @@
2.4 return ipc_server_start_config(&config);
2.5 }
2.6
2.7 -/* A server main loop with no endpoint deletion detection. */
2.8 -
2.9 -long ipc_server_loop(int expected_items, ipc_server_config_type *config)
2.10 -{
2.11 - return ipc_server_managed_loop(expected_items, config, L4_INVALID_CAP);
2.12 -}
2.13 -
2.14 /* A server main loop handling endpoint deletion for an IPC gate dedicated to
2.15 a particular object within its own thread. */
2.16
2.17 -long ipc_server_managed_loop(int expected_items, ipc_server_config_type *config,
2.18 - l4_cap_idx_t irq)
2.19 +long ipc_server_managed_loop(int expected_items, ipc_server_config_type *config)
2.20 {
2.21 ipc_message_t msg;
2.22 - l4_umword_t label, irq_label = (l4_umword_t) irq;
2.23 + l4_umword_t label, irq_label = (l4_umword_t) config->irq;
2.24
2.25 /* Permit other endpoints by dynamically interpreting the label. */
2.26
2.27 @@ -203,8 +195,8 @@
2.28
2.29 /* Unmask the interrupt. */
2.30
2.31 - if (l4_is_valid_cap(irq))
2.32 - ipc_init_irq(irq);
2.33 + if (l4_is_valid_cap(config->irq))
2.34 + ipc_init_irq(config->irq);
2.35
2.36 /* Wait for an incoming message. */
2.37
2.38 @@ -248,8 +240,7 @@
2.39 {
2.40 ipc_server_config_type *config = (ipc_server_config_type *) data;
2.41
2.42 - long err = ipc_server_managed_loop(config->expected_items, config,
2.43 - config->irq);
2.44 + long err = ipc_server_managed_loop(config->expected_items, config);
2.45
2.46 if (config->finaliser != NULL)
2.47 config->finaliser(config);