Remove talloc from libwbclient

simo idra at samba.org
Sun Feb 7 08:47:56 MST 2010


On Sun, 2010-02-07 at 16:22 +0100, Volker Lendecke wrote:
> On Sun, Feb 07, 2010 at 10:10:45AM -0500, simo wrote:
> > Uhmm, I was thinking of setting a thread specific id and prevent any
> > modification from any other thread, a talloc_steal() would work only if
> > it is called by the same thread that created the memory context and only
> > if the 2 memory trees you are touching are in the same thread.
> > 
> > Otherwise we need to make all talloc calls thread safe.
> 
> Yes, if they explicitly or implicitly touch
> null/autofree_context.
> 
> My idea was that we mutex access to the null and autofree
> contexts when they are to be touched and otherwise
> completely leave talloc alone. Users of talloc are on their
> own to coordinate the access to the talloc hierarchy of
> everything one step below the NULL context. talloc.c takes
> care to mutex access to the only shared variables it has:
> null_context and autofree_context.

I guess that may work too.


-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list