Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 43256 invoked by uid 500); 18 Apr 2002 17:15:28 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 43243 invoked from network); 18 Apr 2002 17:15:27 -0000 Date: 18 Apr 2002 17:15:27 -0000 Message-ID: <20020418171527.21192.qmail@icarus.apache.org> From: jerenkrantz@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/atomic/unix apr_atomic.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jerenkrantz 02/04/18 10:15:27 Modified: . CHANGES atomic/unix apr_atomic.c Log: Ensure that the ATOMIC_HASH can not be negative. Submitted by: Joe Orton Reviewed by: Justin Erenkrantz Revision Changes Path 1.260 +3 -0 apr/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apr/CHANGES,v retrieving revision 1.259 retrieving revision 1.260 diff -u -r1.259 -r1.260 --- CHANGES 18 Apr 2002 14:24:16 -0000 1.259 +++ CHANGES 18 Apr 2002 17:15:27 -0000 1.260 @@ -1,5 +1,8 @@ Changes with APR b1 + *) Ensure that the ATOMIC_HASH can not be negative. + [Joe Orton ] + *) Fix a problem with eof reporting with Unix file I/O on unbuffered files. [Stas Bekman ] 1.13 +1 -2 apr/atomic/unix/apr_atomic.c Index: apr_atomic.c =================================================================== RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- apr_atomic.c 9 Apr 2002 06:56:55 -0000 1.12 +++ apr_atomic.c 18 Apr 2002 17:15:27 -0000 1.13 @@ -63,7 +63,7 @@ #define NUM_ATOMIC_HASH 7 /* shift by 2 to get rid of alignment issues */ -#define ATOMIC_HASH(x) (int)(((long)x>>2)%NUM_ATOMIC_HASH) +#define ATOMIC_HASH(x) (unsigned int)(((unsigned long)(x))%(unsigned int)NUM_ATOMIC_HASH) static apr_thread_mutex_t **hash_mutex; apr_status_t apr_atomic_init(apr_pool_t *p ) @@ -92,7 +92,6 @@ apr_thread_mutex_unlock(lock); /* return prev; */ } - printf("debug no workee\n"); /* return *mem; */ } void apr_atomic_set(volatile apr_atomic_t *mem, apr_uint32_t val)