httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] win32/locks.c - Terminal Services on WIN2K
Date Tue, 27 Nov 2001 05:02:38 GMT
From: "Mladen Turk" <mturk@mappingsoft.com>
Sent: Tuesday, October 16, 2001 1:52 PM


> I forgot to send a small thing with the patch...
> That is the owner flag. With the latest lock patch I've done two things at
> once (I know... shoot me :).
> The first is the solving locks on WIN2K running terminal services, and the
> other is using TRUE for initialowner. The reason for that was that I
> couldn't use apr_lock for my win32/shmem proposal, because I have no way to
> determine if the mutex was allready created by me or other proccess.

The change of initial ownership appeared very problematic, and I'm not about
to do so without others' input [we currently do not grab that mutex on creation,
and I presume that behavior is consistent with other platforms.]  Your patch
changed the mutex to owned, yet you didn't unlock it immediately, which I see
as a problem.

As far as the owner flag, I don't care to have other parts of apr quite so 
intimately aware of the internals of other parts, it makes the entire codebase 
more fragile.

Bill



> Index: locks.h
> ===================================================================
> RCS file: /home/cvspublic/apr/include/arch/win32/locks.h,v
> retrieving revision 1.12
> diff -u -r1.12 locks.h
> --- locks.h 2001/06/06 18:11:34 1.12
> +++ locks.h 2001/10/16 19:36:27
> @@ -64,6 +64,7 @@
>      HANDLE mutex;
>      CRITICAL_SECTION section;
>      char *fname;
> +    int   owner;
>  };
> 
>  #endif  /* LOCKS_H */
> 
> 


Mime
View raw message