summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--translate.cxx6
-rw-r--r--translate.h2
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 68674fa7..a169b526 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-08-24 Frank Ch. Eigler <fche@elastic.org>
+ * translate.cxx (emit_global, emit_module_init): Use 2.6.9-compatible
+ rwlock initialization.
+
+2005-08-24 Frank Ch. Eigler <fche@elastic.org>
+
* tapsets.cxx (*::emit_probe_entries): Treat NULL and "" last_errors
both as clean early returns, not errors.
* translate.cxx: Revamp last_error handling logic. Remove all
diff --git a/translate.cxx b/translate.cxx
index fd53d80f..300d0126 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -619,9 +619,8 @@ c_unparser::emit_global (vardecl *v)
else
o->newline() << "static MAP global_"
<< c_varname(v->name) << ";";
- o->newline() << "static DEFINE_RWLOCK("
- << "global_" << c_varname (v->name) << "_lock"
- << ");";
+ o->newline() << "static rwlock_t "
+ << "global_" << c_varname (v->name) << "_lock;";
}
@@ -652,6 +651,7 @@ c_unparser::emit_module_init ()
o->newline() << getmap (v).init();
else
o->newline() << getvar (v).init();
+ o->newline() << "rwlock_init (& global_" << c_varname (v->name) << "_lock);";
}
for (unsigned i=0; i<session->probes.size(); i++)
diff --git a/translate.h b/translate.h
index 2a012273..39e56dd7 100644
--- a/translate.h
+++ b/translate.h
@@ -67,7 +67,7 @@ struct unparser
virtual void emit_global (vardecl* v) = 0;
// static TYPE global_NAME;
- // static DEFINE_RWLOCK(global_NAME_lock);
+ // static rwlock_t global_NAME_lock;
virtual void emit_functionsig (functiondecl* v) = 0;
// static void function_NAME (context* c);