summaryrefslogtreecommitdiff
path: root/src/util/Cache.c
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-06-21 14:10:36 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-06-21 14:10:36 +0000
commit3f17532e0a4c34d88a9e23cda90f8c5cdd7b1e41 (patch)
tree58c683600a20cb3384a1c4f943fae3ab20ae21a2 /src/util/Cache.c
parenta42b08ef5d18054390ea767f5e1dede3af0092b4 (diff)
Renamed local variable 'index' to 'idx' to get rid of gcc compiler warnings
about naming variables after global functions. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3779 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Cache.c')
-rw-r--r--src/util/Cache.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/Cache.c b/src/util/Cache.c
index 218a1e5f..5ba30275 100644
--- a/src/util/Cache.c
+++ b/src/util/Cache.c
@@ -1,11 +1,11 @@
/*@@
- @file Cache.c
- @date Tue Nov 30 08:07:12 1999
- @author Tom Goodale
+ @file Cache.c
+ @date Tue Nov 30 08:07:12 1999
+ @author Tom Goodale
@desc
- Routines dealing with cache alignment.
+ Routines dealing with cache alignment.
@enddesc
- @version $Header$
+ @version $Id$
@@*/
#include <stdlib.h>
@@ -44,9 +44,9 @@ static int cache_set = 0;
Allocates memory aligned on the 'index'ed cache line.
@enddesc
- @var index
+ @var idx
@vdesc cache line index
- @vtype int
+ @vtype unsigned int
@vio in
@vcomment
The cache line to align on
@@ -72,7 +72,7 @@ static int cache_set = 0;
@endreturndesc
@@*/
-void *Util_CacheMalloc(unsigned index,
+void *Util_CacheMalloc(unsigned int idx,
unsigned long size,
void **realstart)
{
@@ -102,7 +102,7 @@ void *Util_CacheMalloc(unsigned index,
/* Find which cache line in the cache it is in */
initial_index = ((unsigned long)data%cache_size)/cacheline_bytes;
- pad = ((index-initial_index)*cacheline_bytes + cacheline_bytes - offset)%cache_size;
+ pad = ((idx-initial_index)*cacheline_bytes + cacheline_bytes - offset)%cache_size;
}
retval = data + pad;