[PATCH] Add thread safety to socket_wrapper

Anoop C S anoopcs at autistici.org
Fri Mar 2 05:52:09 UTC 2018


On Thu, 2018-03-01 at 09:14 -0800, Jeremy Allison wrote:
> On Thu, Mar 01, 2018 at 10:35:26AM +0100, Volker Lendecke wrote:
> > On Thu, Mar 01, 2018 at 01:51:39PM +0530, Anoop C S via samba-technical wrote:
> > > I have made changes accordingly. See the attached patch set.
> > 
> > Thanks for that change!
> > 
> > Small nit-pick: A boolean indicating +1 or -1 swrap_alter_refcount
> > obscures the callers. Can we either make that two functions like
> > swrap_inc/dec_refcount or make the parameter an integer like +1/-1.
> > This would make the callers much more obvious.
> 
> My preference would be for swrap_inc()/dec_refcount(). It makes much
> more sense to me and makes the action obvious.
> 
> swrap_alter_refcount() taking a bool is really opaque to follow,
> sorry.

That's OK. I understand. I was also little bit skeptical while making that change. Please see the
attached patch set.

> Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thread-safety-v2.patch
Type: text/x-patch
Size: 79677 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180302/51b811cc/thread-safety-v2-0001.bin>


More information about the samba-technical mailing list