On Sat, Apr 04, 2020 at 02:37:44PM -0700, Jason Thorpe wrote:
 > +static int
 > +fstrans_lwp_ctor(void *arg, void *obj, int flags)
 > +{
 > +    struct fstrans_lwp_info *fli = obj;
 > +
 > +    memset(fli, 0, sizeof(*fli));
 > +    membar_sync();
 > +    mutex_enter(&fstrans_lock);
 > +    LIST_INSERT_HEAD(&fstrans_fli_head, fli, fli_list);
 > +    mutex_exit(&fstrans_lock);
 > +    return 0;
 > +}
 > 
 > That membar_sync() could be a membar_producer().

...which is subsumed by the membar_enter() inherent in mutex_enter()...

-- 
David A. Holland
[email protected]

Reply via email to