Christian,
I have not looked at this patch in excruciating detail but...
> Hi
>
> Here is the second iteration of the RW lock code for the Windows. It
> includes the fix for the cross-process RW lock.
>
> Christian
>
<snip>
>
> + if (newlock->type == APR_MUTEX) {
> + newlock->blockedReader = NULL;
> + newlock->blockedWriter = NULL;
> + }
> if (scope == APR_INTRAPROCESS) {
> InitializeCriticalSection(&newlock->section);
> + if (newlock->type == APR_READWRITE) {
> + newlock->blockedReader = CreateMutex(NULL, FALSE, NULL);
> + newlock->blockedWriter = CreateMutex(NULL, FALSE, NULL);
> + }
> } else {
> newlock->mutex = CreateMutex(&sec, FALSE, fname);
> + if (newlock->type == APR_READWRITE) {
> + char *tmp;
> +
> + tmp = apr_pstrcat( cont, fname, ".BlockedReader", NULL);
> + newlock->blockedReader = CreateMutex(&sec, FALSE, tmp);
> + tmp = apr_pstrcat( cont, fname, ".BlockedWriter", NULL);
> + newlock->blockedWriter = CreateMutex(&sec, FALSE,
> NULL);
> + }
This looks wrong. An APR_INTRAPROCESS lock should use a critical section, not
a mutex.
Bill