summaryrefslogtreecommitdiff
path: root/locks/netware
diff options
context:
space:
mode:
authoraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2001-10-19 23:25:28 +0000
committeraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2001-10-19 23:25:28 +0000
commit207a4f058761d1311fd55f24de31e562c0472d37 (patch)
tree0b1764fea1dd51a94805db1951951b5659126fd5 /locks/netware
parent704ecfe412ef258213f0435e6f9b466f0e92a0bb (diff)
downloadlibapr-207a4f058761d1311fd55f24de31e562c0472d37.tar.gz
Implement portable accessors for proc mutex. These are equivalent to
apr_os_lock_get/set, but they work for apr_proc_mutex_t types instead. I did my best to implement these on non-Unix platforms from how I saw them implemented for apr_os_lock_get/set, but on those platforms they are untested. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62447 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/netware')
-rw-r--r--locks/netware/proc_mutex.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c
index 1d1143d52..b8d02663c 100644
--- a/locks/netware/proc_mutex.c
+++ b/locks/netware/proc_mutex.c
@@ -103,3 +103,28 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)
APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
+/* Implement OS-specific accessors defined in apr_portable.h */
+
+apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
+ apr_proc_mutex_t *pmutex)
+{
+ ospmutex = pmutex->mutex;
+ return APR_SUCCESS;
+}
+
+apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
+ apr_os_proc_mutex_t *ospmutex,
+ apr_pool_t *pool)
+{
+ if (pool == NULL) {
+ return APR_ENOPOOL;
+ }
+ if ((*pmutex) == NULL) {
+ (*pmutex) = (apr_proc_mutex_t *)apr_palloc(pool,
+ sizeof(apr_proc_mutex_t));
+ (*pmutex)->pool = pool;
+ }
+ (*pmutex)->mutex = ospmutex;
+ return APR_SUCCESS;
+}
+