diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-11-26 17:42:45 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-11-26 17:43:07 -0500 |
commit | 224e23bef7a46c823c4b3d41efdf9dbf98853ed0 (patch) | |
tree | 0b13bb96b54dcaab8416eac542141e9aaa2ea9f6 | |
parent | 62794910c3ec360552209063fc2b9295e3382ca3 (diff) | |
download | systemtap-steved-224e23bef7a46c823c4b3d41efdf9dbf98853ed0.tar.gz systemtap-steved-224e23bef7a46c823c4b3d41efdf9dbf98853ed0.tar.xz systemtap-steved-224e23bef7a46c823c4b3d41efdf9dbf98853ed0.zip |
safety: add another schedule_sched, ahead of the per-context release loop
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | translate.cxx | 7 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,9 @@ 2008-11-26 Frank Ch. Eigler <fche@elastic.org> + * translate.cxx (emit_module_exit): Add another synchronize_sched. + +2008-11-26 Frank Ch. Eigler <fche@elastic.org> + * main.cxx (main): Advise users to try '--vp ...' after a pass error. 2008-11-26 Frank Ch. Eigler <fche@elastic.org> diff --git a/translate.cxx b/translate.cxx index 49a86160..43299791 100644 --- a/translate.cxx +++ b/translate.cxx @@ -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"; |