1.1 --- a/libfsclient/lib/src/client.cc Mon Jun 07 00:50:14 2021 +0200
1.2 +++ b/libfsclient/lib/src/client.cc Fri Jul 02 23:53:13 2021 +0200
1.3 @@ -20,6 +20,7 @@
1.4 */
1.5
1.6 #include <l4/re/env.h>
1.7 +#include <ipc/irq.h>
1.8
1.9 #include <stdio.h>
1.10 #include <stdlib.h>
1.11 @@ -115,7 +116,7 @@
1.12
1.13 /* Handle an inability to access by blocking, exiting if waiting failed. */
1.14
1.15 - if (client_wait(file))
1.16 + if (client_wait_file(file))
1.17 return 0;
1.18 }
1.19
1.20 @@ -458,14 +459,39 @@
1.21
1.22
1.23
1.24 -/* Register for events concerning a file. */
1.25 +/* Bind and initialise files involved with notifications. */
1.26
1.27 -long client_wait(file_t *file)
1.28 +long client_wait_init(file_t *file)
1.29 {
1.30 if (file == NULL)
1.31 return -L4_EINVAL;
1.32
1.33 - return file_notify_wait(file);
1.34 + long err = file_notify_bind_file(file);
1.35 +
1.36 + if (err)
1.37 + return err;
1.38 +
1.39 + ipc_init_irq(file->irq);
1.40 +
1.41 + return L4_EOK;
1.42 +}
1.43 +
1.44 +/* Wait for events involving a specific file. */
1.45 +
1.46 +long client_wait_file(file_t *file)
1.47 +{
1.48 + if (file == NULL)
1.49 + return -L4_EINVAL;
1.50 +
1.51 + return file_notify_wait_file(file);
1.52 +}
1.53 +
1.54 +/* Wait for events concerning files, referencing a file object if an event is
1.55 + delivered. */
1.56 +
1.57 +long client_wait_files(file_t **file)
1.58 +{
1.59 + return file_notify_wait_files(file);
1.60 }
1.61
1.62