summaryrefslogtreecommitdiff
path: root/locks/netware
diff options
context:
space:
mode:
authoraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2001-10-17 00:33:00 +0000
committeraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2001-10-17 00:33:00 +0000
commit644984101621c469c255a7682b0252a4997cf660 (patch)
tree165cda9c95dc0432268a06e5530abc06fa1cf17d /locks/netware
parentaa365ec9e3cec131802d732f116932f84c00a827 (diff)
downloadlibapr-644984101621c469c255a7682b0252a4997cf660.tar.gz
Added a new parameter to apr_thread_mutex_init(). Mutexes are now by
default not nested, but an init flag can enable them. I added a new test to testlockperf to show how much faster non-nested mutexes are. I also updated calls to apr_thread_mutex_init() wherever I could find them. This patch only implements this for Unix (nested locks already existed on Unix, so this patch just optionally enables/disables them). I did my best to change the function declaration on other platforms, but someone will have to double check me. Those other platforms will also have to either enable nested locks (sometimes available in their thread library) or just do what Unix does. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62435 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/netware')
-rw-r--r--locks/netware/thread_mutex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/locks/netware/thread_mutex.c b/locks/netware/thread_mutex.c
index d672ac70f..a38ce429b 100644
--- a/locks/netware/thread_mutex.c
+++ b/locks/netware/thread_mutex.c
@@ -68,6 +68,7 @@ static apr_status_t thread_mutex_cleanup(void *data)
}
APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
+ unsigned int flags,
apr_pool_t *pool)
{
apr_thread_mutex_t *new_mutex = NULL;
@@ -79,6 +80,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
}
new_mutex->pool = pool;
+ /* FIXME: only use recursive locks if (flags & APR_THREAD_MUTEX_NESTED) */
new_mutex->mutex = NXMutexAlloc(NX_MUTEX_RECURSIVE, NULL, NULL);
if(new_mutex->mutex == NULL)