bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/6] tmpfs: use a thread timeout


From: Samuel Thibault
Subject: Re: [PATCH 1/6] tmpfs: use a thread timeout
Date: Mon, 2 Jun 2014 02:12:14 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Sun 01 Jun 2014 22:02:59 +0200, a écrit :
> There is no need to keep all the threads around, just the master
> thread.

Ack.

> * tmpfs/tmpfs (diskfs_thread_function): Use a thread timeout.
> ---
>  tmpfs/tmpfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c
> index a45d343..718c6d8 100644
> --- a/tmpfs/tmpfs.c
> +++ b/tmpfs/tmpfs.c
> @@ -296,13 +296,14 @@ diskfs_append_args (char **argz, size_t *argz_len)
>  static void *
>  diskfs_thread_function (void *demuxer)
>  {
> +  static int thread_timeout = 1000 * 60 * 2; /* two minutes */
>    error_t err;
>  
>    do
>      {
>        ports_manage_port_operations_multithread (diskfs_port_bucket,
>                                               (ports_demuxer_type) demuxer,
> -                                             0,
> +                                             thread_timeout,
>                                               0,
>                                               0);
>        err = diskfs_shutdown (0);
> -- 
> 2.0.0.rc2
> 

-- 
Samuel
gawk; talk; nice; date; wine; grep; touch; unzip; strip;  \
touch; gasp; finger; gasp; lyx; gasp; latex; mount; fsck; \
more; yes; gasp; umount; make clean; make mrproper; sleep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]