[geos-devel] RFC for Thread safe CAPI announced

Chuck Thibert charles.thibert at ingres.com
Wed Oct 22 14:37:25 EDT 2008


On Sat, 2008-10-18 at 08:28 +0100, Mark Cave-Ayland wrote:
> Well the definition is fairly woolly as a quick search revealed that the
> distinction between thread safety and re-entrancy is not always apparent
> in various descriptions of the functions. Probably the best descriptions I
> found were here:
> 
> http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.genprogc/doc/genprogc/writing_reentrant_thread_safe_code.htm
> http://www.ibm.com/developerworks/linux/library/l-reent.html
> 
> These basically describe a re-entrant function as one that does not hold
> static data across successive calls, or return a pointer to static data.
> So you could argue that since the static data will be held outside of the
> function (and it is not modified by the function) then it is re-entrant
> and thus qualifies for the _r suffix.
> 
> Then again, I will confess up front that I don't do much in the way of
> multi-threaded programming and so this was just my interpretation of the
> above and other random sources located using Google.
> 

Thanks Mark.

I agree, it looks like these changes should make the functions re-entrant.

I think I'll keep it at _r and let a vote finalize it.

Are there other comments/feedback?

Thanks,
Chuck


More information about the geos-devel mailing list