[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] [patch] make libxml2 slightly more thread-friendly
- From: Ted Phelps <phelps mantara com>
- To: Rob Richards <rrichards ctindustries net>
- Cc: xml gnome org, veillard redhat com
- Subject: Re: [xml] [patch] make libxml2 slightly more thread-friendly
- Date: Fri, 16 Feb 2007 07:02:27 -0600
Rob Richards writes:
> Ted Phelps wrote:
> > + /* Swap it into the global_init_lock */
> > + InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);
> > +
> >
> This causes the builds to fail under VC6 now.
Mea culpa!
> I have attached a patch that will call InterlockedCompareExchange if
> InterlockedCompareExchangePointer is not defined. Ted, since you made
> the original change and understand it all, can you check this change
> to make sure its correct? I basically took this from another project
> that ran into the same issue.
It should work fine so long as sizeof(LONG) == sizeof(void *), which I
think will be the case for any version of Visual Studio which doesn't
provide InterlockedCompareExchangePointer. Your cast is wrong
-- you should be casting to a (LONG *) rather than a (void **) -- but
otherwise I think it's fine.
Cheers,
-Ted
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]