From 4a6d3dfa0f3ce20f95c892818b9f1b617ddcd0cf Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 2 Oct 2007 21:41:06 +0000 Subject: PR 3635: reduce number of global objects 2007-10-02 Frank Ch. Eigler PR 3635 * translate.cxx (emit_global): Wrap all globals and locks into one top-level struct. Update references to former "global_VAR" prefix. * translate.h (emit_global_init): New function. --- translate.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'translate.h') diff --git a/translate.h b/translate.h index fde8af9f..6c8b4785 100644 --- a/translate.h +++ b/translate.h @@ -64,9 +64,13 @@ struct unparser // ... // } context [MAXCONCURRENCY]; + // struct { virtual void emit_global (vardecl* v) = 0; - // static TYPE global_NAME; - // static rwlock_t global_NAME_lock; + // TYPE s_NAME; // NAME is prefixed with "s_" to avoid kernel id collisions + // rwlock_t s_NAME_lock; + // } global = { + virtual void emit_global_init (vardecl* v) = 0; + // }; virtual void emit_global_param (vardecl* v) = 0; // module_param_... -- at end of file -- cgit