For background to this email, read the teardown races section in
utrace.txt and Roland's asynchronous detach email.
The crash-suspend.c example suffers from the teardown races problem.
(Since systemtap's utrace code is a more elaborate version of
crash-suspend.c, systemtap has the same problem.)
Thanks, David. That is exactly the right example of using kernel
synchronization primitives with callbacks to implement blocking behaviors
you want. The wrinkle there is that you use UTRACE_INTERRUPT, which
(potentially) perturbs the behavior of every traced thread. Doing this
gives you a
On Wed, Jul 30, 2008 at 04:19:44PM -0500, David Smith wrote:
...
@@ -197,14 +224,33 @@ static void __exit exit_crash_suspend(vo
error, t-pid);
}
else {
- int ret = utrace_control(t, engine, UTRACE_DETACH);