Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 22286 invoked by uid 6000); 12 Oct 1999 19:21:14 -0000 Received: (qmail 22270 invoked by uid 2016); 12 Oct 1999 19:21:12 -0000 Delivered-To: apcore-apache-2.0-cvs@apache.org Received: (qmail 22263 invoked by uid 236); 12 Oct 1999 19:21:11 -0000 Date: 12 Oct 1999 19:21:11 -0000 Message-ID: <19991012192111.22262.qmail@hyperreal.org> From: rbb@hyperreal.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/lib/apr/locks/unix intraproc.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org rbb 99/10/12 12:21:11 Modified: src/lib/apr/locks/unix intraproc.c Log: Fix some locking problems in the original pthreads locking code. Some of this was me being overly cautious. Some of it was me being careless. :) Revision Changes Path 1.6 +2 -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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- intraproc.c 1999/10/12 13:09:31 1.5 +++ intraproc.c 1999/10/12 19:21:10 1.6 @@ -63,10 +63,7 @@ ap_status_t lock_intra_cleanup(void *data) { struct lock_t *lock = (struct lock_t *) data; - if (lock->curr_locked == 1) { - return pthread_mutex_unlock(lock->intraproc); - } - return APR_SUCCESS; + return pthread_mutex_unlock(lock->intraproc); } ap_status_t create_intra_lock(struct lock_t *new) @@ -89,7 +86,7 @@ return stat; } - if ((stat = pthread_mutex_destroy(new->intraproc))) { + if ((stat = pthread_mutexattr_destroy(&mattr))) { lock_intra_cleanup(new); return stat; } @@ -102,7 +99,6 @@ ap_status_t lock_intra(struct lock_t *lock) { - lock->curr_locked = 1; return pthread_mutex_lock(lock->intraproc); } @@ -111,7 +107,6 @@ ap_status_t status; status = pthread_mutex_unlock(lock->intraproc); - lock->curr_locked = 0; return status; }