summaryrefslogtreecommitdiff
path: root/locks
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-11-16 18:25:00 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-11-16 18:25:00 +0000
commit2b0e2308c7d2ddfd89824f62fca68865f5e787c4 (patch)
tree37c1dcb2de6079c4dd0c6129ff4ec5ec902897fb /locks
parent4335684ce53603753e671250626ff655617d429e (diff)
downloadlibapr-2b0e2308c7d2ddfd89824f62fca68865f5e787c4.tar.gz
thread id is not always a scalar
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64749 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r--locks/unix/thread_mutex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/locks/unix/thread_mutex.c b/locks/unix/thread_mutex.c
index 306b02174..9f0d7cc50 100644
--- a/locks/unix/thread_mutex.c
+++ b/locks/unix/thread_mutex.c
@@ -199,6 +199,8 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
return rv;
}
+static apr_os_thread_t invalid_thread_id; /* all zeroes */
+
APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
{
apr_status_t status;
@@ -217,7 +219,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
if (apr_atomic_dec32(&mutex->owner_ref) != 0)
return APR_SUCCESS;
- mutex->owner = 0;
+ mutex->owner = invalid_thread_id;
}
/*
* This should never occur, and indicates an application error