You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Aaron Bannert <aa...@clove.org> on 2001/10/17 03:31:46 UTC
Re: cvs commit: apr/locks/os2 thread_mutex.c
On Wed, Oct 17, 2001 at 01:14:52AM -0000, bjh@apache.org wrote:
> bjh 01/10/16 18:14:52
>
> Modified: locks/os2 thread_mutex.c
> Log:
> Remove FIXME comment. Yes, OS/2 native locks support nesting.
>
> Revision Changes Path
> 1.5 +0 -1 apr/locks/os2/thread_mutex.c
>
> Index: thread_mutex.c
> ===================================================================
> RCS file: /home/cvs/apr/locks/os2/thread_mutex.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- thread_mutex.c 2001/10/17 00:33:00 1.4
> +++ thread_mutex.c 2001/10/17 01:14:52 1.5
> @@ -79,7 +79,6 @@
> new_mutex = (apr_thread_mutex_t *)apr_palloc(pool, sizeof(apr_thread_mutex_t));
> new_mutex->pool = pool;
>
> - /* FIXME: Can OS/2 do nested (aka recursive) locks natively? */
> rc = DosCreateMutexSem(NULL, &(new_mutex->hMutex), 0, FALSE);
> *mutex = new_mutex;
Sorry, my comment was totally unclear and misleading. I meant to say:
OS/2 needs to optionally support nested locks depending on if
(flags & APR_THREAD_MUTEX_NESTED) is true. Same goes for the other
platforms -- Unix is taken care of.
I guess we'd have to ask the converse: Can OS/2 support non-nested locks?
-aaron
Re: cvs commit: apr/locks/os2 thread_mutex.c
Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Tue, 16 Oct 2001 18:31:46 -0700, Aaron Bannert wrote:
>On Wed, Oct 17, 2001 at 01:14:52AM -0000, bjh@apache.org wrote:
>> bjh 01/10/16 18:14:52
>>
>> Modified: locks/os2 thread_mutex.c
>> Log:
>> Remove FIXME comment. Yes, OS/2 native locks support nesting.
[...]
>Sorry, my comment was totally unclear and misleading. I meant to say:
>
>OS/2 needs to optionally support nested locks depending on if
>(flags & APR_THREAD_MUTEX_NESTED) is true. Same goes for the other
>platforms -- Unix is taken care of.
>
>I guess we'd have to ask the converse: Can OS/2 support non-nested locks?
Not with the native mutex, no. As I understand it, this is just a
performance optimisation so allowing nesting when not actually required
won't hurt. However, running without nesting support when it IS required
will lead to deadlock.
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------