On Mon, 2009-08-24 at 09:50 -0500, Mike Slegeir wrote:
> I haven't had a chance to test the patch yet, but I will shortly.  

Please test svn head instead. I've applied your patch with a few tweaks,
and reworked the PdfMutex stuff.

> You're right about the lack of recursion of the pthread mutexes; I 
> didn't think about that.  I believe the Windows critical sections are 
> recursive by default so that shouldn't be an issue.

Correct. Not just by default - it looks like there's no way to get
non-recursive critical sections. No problem; PoDoFo doesn't really seem
to need non-recursive critical sections. PdfMutex hasn't been trying to
prevent re-entrancy (otherwise the !PODOFO_MULTI_THREAD case would still
do double-locking detection) and critical sections are already
reentrant, so I've just made sure the pthread case is too.

> One thing I did 
> want to mention is that it would be a good idea to call 
> pthread_mutexattr_init with the mutexattr before setting any attributes 
> because its values should be undefined how you're using it.  Calling the 
> init will use all the default attributes for the mutex (and then you can 
> override the type for the reentrant mutex).

Good catch. Thanks. I love patch review :-)

--
Craig Ringer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to