summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx
index 41a424ed..43299791 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -1124,7 +1124,7 @@ c_unparser::emit_module_init ()
o->newline() << "rc = -EINVAL;";
o->newline(-1) << "}";
- // XXX: perform buildid-based checking if able
+ // perform buildid-based checking if able
o->newline() << "if (_stp_module_check()) rc = -EINVAL;";
o->newline(-1) << "}";
@@ -1273,6 +1273,11 @@ c_unparser::emit_module_exit ()
// But some other probes may have launched too during unregistration.
// Let's wait a while to make sure they're all done, done, done.
+ // cargo cult prologue
+ o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED";
+ o->newline() << "synchronize_sched();";
+ o->newline() << "#endif";
+
// NB: systemtap_module_exit is assumed to be called from ordinary
// user context, say during module unload. Among other things, this
// means we can sleep a while.
@@ -1287,7 +1292,7 @@ c_unparser::emit_module_exit ()
o->newline () << "yield ();"; // aka schedule() and then some
o->newline(-2) << "} while (holdon);";
- //
+ // cargo cult epilogue
o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED";
o->newline() << "synchronize_sched();";
o->newline() << "#endif";