From 8d59b39f96b89eb055d77d422a923c499d2a5fca Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 26 Nov 2008 13:59:53 -0500 Subject: safety: add paranoid call to synchronize_sched() during shutdown process --- translate.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index 1cf7361e..41a424ed 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1287,6 +1287,11 @@ c_unparser::emit_module_exit () o->newline () << "yield ();"; // aka schedule() and then some o->newline(-2) << "} while (holdon);"; + // + o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED"; + o->newline() << "synchronize_sched();"; + o->newline() << "#endif"; + // XXX: might like to have an escape hatch, in case some probe is // genuinely stuck somehow @@ -4860,6 +4865,7 @@ translate_pass (systemtap_session& s) s.op->newline() << "#include \"stat.c\""; s.op->newline() << "#include "; s.op->newline() << "#include "; + s.op->newline() << "#include "; s.op->newline() << "#include "; s.op->newline() << "#include "; s.op->newline() << "#include "; -- cgit