Justus Winter, le Mon 26 May 2014 13:19:19 +0200, a écrit :
> * libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field
> refcnt.
> (struct trivfs_control): Remove unused field lock.
> * libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex
> initialization.
> * libtrivfs/io-
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field
refcnt.
(struct trivfs_control): Remove unused field lock.
* libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex
initialization.
* libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust
accordingly.
* lib
Justus Winter, le Fri 23 May 2014 09:48:35 +0200, a écrit :
> It is an optimization. This way we can use just 1 atomic operation
> when trivfs_peropen_destroy_hook is not used, and 3 when it is. If we
> do it like you described, we need two in any case.
Then you could rather use something like:
Quoting Samuel Thibault (2014-05-23 01:40:19)
> Justus Winter, le Tue 13 May 2014 21:02:56 +0200, a écrit :
> > diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c
> > index f98da6a..cce736d 100644
> > --- a/libtrivfs/protid-clean.c
> > +++ b/libtrivfs/protid-clean.c
> > @@ -31,19 +31,
Justus Winter, le Tue 13 May 2014 21:02:56 +0200, a écrit :
> diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c
> index f98da6a..cce736d 100644
> --- a/libtrivfs/protid-clean.c
> +++ b/libtrivfs/protid-clean.c
> @@ -31,19 +31,23 @@ trivfs_clean_protid (void *arg)
> (*trivfs_prot
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field
refcnt.
(struct trivfs_control): Remove unused field lock.
* libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex
initialization.
* libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust
accordingly.
* lib