Damien Zammit, le dim. 27 févr. 2022 07:17:10 +0000, a ecrit:
> TESTED via booting a rump disk

Errr, we can't just change libmachdev like that, there are several users
of it which may not be threadsafe at all. Rather export the demuxer
function and let users call ports_manage_port_operations_multithread
themselves.

> ---
>  libmachdev/ds_routines.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
> index 139551f6..6c150c8f 100644
> --- a/libmachdev/ds_routines.c
> +++ b/libmachdev/ds_routines.c
> @@ -351,7 +351,11 @@ void * machdev_server(void *arg)
>    /* Launch.  */
>    do
>      {
> -      ports_manage_port_operations_one_thread (machdev_device_bucket, 
> demuxer, 0);
> +      ports_manage_port_operations_multithread (machdev_device_bucket,
> +                                             demuxer,
> +                                             1000 * 60 * 2, /* two minutes 
> thread */
> +                                             1000 * 60 * 10,/* ten minutes 
> server */
> +                                             0);
>      } while (1);
> 
>    return NULL;
> --
> 2.35.1

Reply via email to