diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | translate.cxx | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2006-03-13 Frank Ch. Eigler <fche@elastic.org> + + * translate.cxx (emit_globals): Tag globals, especially the locks, + as __cacheline_aligned. + 2006-03-09 Frank Ch. Eigler <fche@elastic.org> * translate.cxx (emit_locks): Emit dummy references to unlock_ ... diff --git a/translate.cxx b/translate.cxx index c2146e84..94c6147a 100644 --- a/translate.cxx +++ b/translate.cxx @@ -925,22 +925,22 @@ c_unparser::emit_global (vardecl *v) string vn = c_varname (v->name); if (v->arity == 0) - o->newline() << "static " + o->newline() << "static __cacheline_aligned " << c_typename (v->type) << " " << "global_" << vn << ";"; else if (v->type == pe_stats) { - o->newline() << "static PMAP global_" + o->newline() << "static __cacheline_aligned PMAP global_" << vn << ";"; } else { - o->newline() << "static MAP global_" + o->newline() << "static __cacheline_aligned MAP global_" << vn << ";"; } - o->newline() << "static rwlock_t " + o->newline() << "static __cacheline_aligned rwlock_t " << "global_" << vn << "_lock;"; // Emit module_param helper variable |