From a432e18a24569804c82f14b36ae7d8dfcc245da7 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 28 Nov 2005 22:08:39 +0000 Subject: 2005-11-28 Martin Hunt * alloc.c (__stp_valloc_percpu): Use same code for up and smp. (_stp_per_cpu_ptr): New macro. * user/alloc.c: Ditto. * map.c: Use _stp_map_cpu_ptr(). * map-stat.c: Ditto. * pmap-gen.c: Ditto. * runtime.h: Include alloc.c * user/runtime.h: Ditto. --- runtime/map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/map.c') diff --git a/runtime/map.c b/runtime/map.c index 70efd365..556cd85f 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -249,7 +249,7 @@ static MAP _stp_pmap_new(unsigned max_entries, int type, int key_size, int data_ return NULL; for_each_cpu(i) { - m = per_cpu_ptr (map, i); + m = _stp_per_cpu_ptr (map, i); if (_stp_map_init(m, max_entries, type, key_size, data_size, i)) { failed = i; goto err; @@ -370,7 +370,7 @@ void _stp_pmap_del(MAP map) return; for_each_cpu(i) { - m = per_cpu_ptr (map, i); + m = _stp_per_cpu_ptr (map, i); _stp_vfree(m->membuf); } @@ -711,7 +711,7 @@ void _stp_map_printn (MAP map, int n, const char *fmt) void _stp_pmap_printn_cpu (MAP map, int n, const char *fmt, int cpu) { - MAP m = per_cpu_ptr (map, cpu); + MAP m = _stp_per_cpu_ptr (map, cpu); _stp_map_printn (m, n, fmt); } @@ -826,7 +826,7 @@ MAP _stp_pmap_agg (MAP map) _stp_map_clear (agg); for_each_cpu(i) { - m = per_cpu_ptr (map, i); + m = _stp_per_cpu_ptr (map, i); /* walk the hash chains. */ for (hash = 0; hash < HASH_TABLE_SIZE; hash++) { head = &m->hashes[hash]; -- cgit