]> git.karo-electronics.de Git - linux-beck.git/commitdiff
markers: marker_synchronize_unregister()
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 29 Sep 2008 15:05:13 +0000 (11:05 -0400)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:38:26 +0000 (10:38 +0200)
Create marker_synchronize_unregister() which must be called before the end of
exit() to make sure every probe callers have exited the non preemptible section
and thus are not executing the probe code anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/marker.h

index 1290653f924181333f6699d37b161238370b1515..889196c7fbb1e77cc5b4561e2b0b7f937b864434 100644 (file)
@@ -160,4 +160,11 @@ extern int marker_probe_unregister_private_data(marker_probe_func *probe,
 extern void *marker_get_private_data(const char *name, marker_probe_func *probe,
        int num);
 
+/*
+ * marker_synchronize_unregister must be called between the last marker probe
+ * unregistration and the end of module exit to make sure there is no caller
+ * executing a probe when it is freed.
+ */
+#define marker_synchronize_unregister() synchronize_sched()
+
 #endif