From: Bernd Schubert Date: Tue, 4 Jun 2024 11:56:09 +0000 (+0200) Subject: Make struct fuse_req::ctr a C11 _Atomic X-Git-Tag: fuse-3.17.1-rc0~112^2~1 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d44162534ce2e3a9e05a9fa5b399b9dcf02f6820;p=qemu-gpiodev%2Flibfuse.git Make struct fuse_req::ctr a C11 _Atomic The variable is not modified exclusively with locks since commit cef8c8b24902 ("Add support for no_interrupt") anymore. That commit is safe, but might be error prone to future updates. Changing it to a C11 _Atomic should avoid issues. --- diff --git a/lib/fuse_i.h b/lib/fuse_i.h index 7a2ae04..a856782 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -14,7 +14,7 @@ struct mount_opts; struct fuse_req { struct fuse_session *se; uint64_t unique; - int ctr; + _Atomic int ctr; pthread_mutex_t lock; struct fuse_ctx ctx; struct fuse_chan *ch;