You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1999/10/12 07:54:02 UTC
cvs commit: apache-2.0/src/lib/apr/locks/unix intraproc.c
manoj 99/10/11 22:54:02
Modified: src/lib/apr/locks/unix intraproc.c
Log:
Fix compilation warnings, and probably some bugs in the process.
Revision Changes Path
1.2 +9 -7 apache-2.0/src/lib/apr/locks/unix/intraproc.c
Index: intraproc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/intraproc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- intraproc.c 1999/08/17 15:59:42 1.1
+++ intraproc.c 1999/10/12 05:54:00 1.2
@@ -55,15 +55,17 @@
#include "apr_lock.h"
#include "apr_general.h"
+#include "apr_lib.h"
#include "locks.h"
#if defined (USE_PTHREAD_SERIALIZE)
-ap_status_t lock_intra_cleanup(struct lock_t *lock)
+ap_status_t lock_intra_cleanup(void *data)
{
ap_status_t stat;
+ struct lock_t *lock = (struct lock_t *) data;
if (lock->curr_locked == 1) {
- if (stat = pthread_mutex_unlock(lock->intraproc)) {
+ if ((stat = pthread_mutex_unlock(lock->intraproc)) == 0) {
return stat;
}
}
@@ -95,7 +97,7 @@
return stat;
}
- new->curr_locked == 0;
+ new->curr_locked = 0;
ap_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup, NULL);
return APR_SUCCESS;
}
@@ -104,8 +106,8 @@
{
ap_status_t stat;
- lock->curr_locked == 1;
- if (stat = pthread_mutex_lock(lock->intraproc)) {
+ lock->curr_locked = 1;
+ if ((stat = pthread_mutex_lock(lock->intraproc)) == 0) {
return stat;
}
return APR_SUCCESS;
@@ -115,10 +117,10 @@
{
ap_status_t stat;
- if (stat = pthread_mutex_unlock(lock->intraproc)) {
+ if ((stat = pthread_mutex_unlock(lock->intraproc)) == 0) {
return stat;
}
- lock->curr_locked == 0;
+ lock->curr_locked = 0;
return APR_SUCCESS;
}