aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/markers.txt
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-11-27 03:14:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-28 10:47:41 -0500
commita838c2ec6ea1f18431da74dfe4978c57355b95f3 (patch)
treec51852ff62ec383c27e21f318f5e3180f141b885 /Documentation/markers.txt
parentc7cc77307669336a08928ab8668bdb3f3bcc021b (diff)
markers: comment marker_synchronize_unregister() on data dependency
Add document and comments on marker_synchronize_unregister(): it should be called before freeing resources that the probes depend on. Based on comments from Lai Jiangshan and Mathieu Desnoyers. Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/markers.txt')
-rw-r--r--Documentation/markers.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/Documentation/markers.txt b/Documentation/markers.txt
index 6d275e4ef385..d2b3d0e91b26 100644
--- a/Documentation/markers.txt
+++ b/Documentation/markers.txt
@@ -51,11 +51,16 @@ to call) for the specific marker through marker_probe_register() and can be
51activated by calling marker_arm(). Marker deactivation can be done by calling 51activated by calling marker_arm(). Marker deactivation can be done by calling
52marker_disarm() as many times as marker_arm() has been called. Removing a probe 52marker_disarm() as many times as marker_arm() has been called. Removing a probe
53is done through marker_probe_unregister(); it will disarm the probe. 53is done through marker_probe_unregister(); it will disarm the probe.
54marker_synchronize_unregister() must be called before the end of the module exit 54
55function to make sure there is no caller left using the probe. This, and the 55marker_synchronize_unregister() must be called between probe unregistration and
56fact that preemption is disabled around the probe call, make sure that probe 56the first occurrence of
57removal and module unload are safe. See the "Probe example" section below for a 57- the end of module exit function,
58sample probe module. 58 to make sure there is no caller left using the probe;
59- the free of any resource used by the probes,
60 to make sure the probes wont be accessing invalid data.
61This, and the fact that preemption is disabled around the probe call, make sure
62that probe removal and module unload are safe. See the "Probe example" section
63below for a sample probe module.
59 64
60The marker mechanism supports inserting multiple instances of the same marker. 65The marker mechanism supports inserting multiple instances of the same marker.
61Markers can be put in inline functions, inlined static functions, and 66Markers can be put in inline functions, inlined static functions, and