You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Greg Stein <gs...@lyra.org> on 2001/05/01 03:12:46 UTC
Re: Reader/writer locks?
On Fri, Apr 27, 2001 at 09:33:00PM -0700, Justin Erenkrantz wrote:
> Are reader/writer locks implemented in APR?
We have reader/writer locks on files, but not "freestanding" locks.
Let's say that you have an apr_file_t handy. You can then arbitrate access
to it using the apr_file_lock() and apr_file_unlock() functions.
> In include/apr_lock.h:
>
> typedef enum {APR_MUTEX, APR_READWRITE} apr_locktype_e;
>
> I don't see any use of apr_locktype_e in APR (besides the definition
> in the apr_lock_t structure). Are we just waiting for someone to
> implement APR_READWRITE? Is everything right now essentially acting
> as APR_MUTEX (regardless of what you pass in)?
As Ryan mentioned, that stuff is pending somebody implementing them. I
almost tossed them a while back since it is misleading to keep them there.
Somebody say "don't" and I didn't bother to push it.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/