From 3fd08858f53e9506a43e85597871867f717b16b5 Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 13 Mar 2006 17:30:45 +0000 Subject: 2006-03-13 Frank Ch. Eigler * translate.cxx (emit_globals): Tag globals, especially the locks, as __cacheline_aligned. --- ChangeLog | 5 +++++ translate.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e67a331..8022db23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-13 Frank Ch. Eigler + + * translate.cxx (emit_globals): Tag globals, especially the locks, + as __cacheline_aligned. + 2006-03-09 Frank Ch. Eigler * 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 -- cgit