apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: recursive apr_thread_rwlock_wrlock?
Date Tue, 30 Mar 2004 08:16:34 GMT
On Mon, Mar 29, 2004 at 05:22:20PM -0500, Marc M. Adkins wrote:
> On Monday 29 March 2004 01:16 am, Joe Orton wrote:
> > On Sun, Mar 28, 2004 at 04:57:53PM -0500, Marc M. Adkins wrote:
> > > Is it possible that apr_thread_rwlock_wrlock will allow recursive
> > > behavior on Windows but not on Linux?  By this I mean that a specific
> > > thread will request a write lock and then request the same write lock
> > > again, intending to release it twice on the way out:
> >
> > Yes, that gives undefined behaviour in a POSIX implementation,
> > apr_thread_rwlock.h on HEAD says:
> I am apparently not using anything close to the HEAD.

No, not your fault, the comment isn't in 0.9.x and really should be. 

There are probably lots of things like this which are not documented at
all in APR; if you want to get a better understanding of the assumptions
you can make in threaded code on POSIXy systems you'd be well advised to
go and read the relevant bits of the Single Unix spec: e.g.



View raw message