From c5a2dde1672adc9e326fda6533e9dd90f69dc2f1 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 14 Dec 2005 21:06:57 +0000 Subject: 2005-12-14 Martin Hunt * pmap-gen.c (_stp_pmap_new_*): Initialize lock. (_stp_pmap_set_*): Lock map while in use. (_stp_pmap_add_*): Lock map while in use. (_stp_pmap_get_cpu): Ditto. (_stp_pmap_get): Lock each per-cpu map. * map-gen.c: Define and use NULLRET for a NULL return value. * map.c (_stp_pmap_clear): New function. (_stp_pmap_agg): Lock each per-cpu map as it gets aggregated. --- runtime/map.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/map.h') diff --git a/runtime/map.h b/runtime/map.h index cc470e19..4bb8aee2 100644 --- a/runtime/map.h +++ b/runtime/map.h @@ -102,6 +102,8 @@ struct map_root { int data_offset; + spinlock_t lock; + /* the hash table for this array */ struct hlist_head hashes[HASH_TABLE_SIZE]; -- cgit