apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Gross <ChristianGr...@yahoo.de>
Subject WriteLock ++ ;)
Date Sat, 28 Apr 2001 23:29:02 GMT
I just looked at the UNIX based RW lock stuff.  There is one
difference between what I uploaded and what Justin uploaded.  He used
one method call to acquire a reader or writer.  I used two.  Which one
is right?

I used two function calls because I thought it would keep things as
simple and fast as possible.  I looked in the UNIX code and within the
apr_lock_acquire_rw routine there is a switch to test which type of
lock to acquire.  I would tend to say two method calls would be faster
(OK it is splitting hairs ;) )
 
Another question that I have is follows.

A user creates a regular lock and calls the RW lock routines or
creates a RW lock and calls the regular lock routines.  What happens?
In the Windows PATCH I decided to return an error saying this is not
possible.  However because of that I had to modify the apr_errno.h
file to include an extra error code.

BTW I just caught an error in the Windows routines in that when the
lock is cross process my reader writer will fail.  Need to fix that...

Christian


Mime
View raw message