diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-29 21:19:44 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-29 21:19:44 +0000 |
commit | b33df13023a432c63cb6d085d5e0b4a7bf0319c4 (patch) | |
tree | 6a1326f28d5c66ef737116700975f6b3b31ff533 /locks/beos | |
parent | d788728fcc560415967ce73cf21e9315edd73029 (diff) | |
download | libapr-b33df13023a432c63cb6d085d5e0b4a7bf0319c4.tar.gz |
Split APR_THREAD_MUTEX_DEFAULT with a new APR_THREAD_MUTEX_UNNESTED
which guarentees unnested lock behavior, keep APR_THREAD_MUTEX_DEFAULT
on Win32, Netware and OS2 as nested locks, leave Unix and BeOS with
unnested locks by default.
Needs an implementation on Netware and OS2 for UNNESTED locks, for now
return APR_ENOTIMPL.
Required for absolute locks in series for Win32 on the same thread,
since CriticalSection objects are blindingly fast without contention,
but they will always nest on the same thread.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63440 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/beos')
-rw-r--r-- | locks/beos/thread_mutex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/locks/beos/thread_mutex.c b/locks/beos/thread_mutex.c index 33b89b90d..0ffd30533 100644 --- a/locks/beos/thread_mutex.c +++ b/locks/beos/thread_mutex.c @@ -96,6 +96,10 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex, new_m->LockCount = 0; new_m->Lock = stat; new_m->pool = pool; + + /* Optimal default is APR_THREAD_MUTEX_UNNESTED, + * no additional checks required for either flag. + */ new_m->nested = flags & APR_THREAD_MUTEX_NESTED; apr_pool_cleanup_register(new_m->pool, (void *)new_m, _thread_mutex_cleanup, |