diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2008-11-27 16:14:44 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-28 16:47:41 +0100 |
commit | a838c2ec6ea1f18431da74dfe4978c57355b95f3 (patch) | |
tree | c51852ff62ec383c27e21f318f5e3180f141b885 /Documentation | |
parent | c7cc77307669336a08928ab8668bdb3f3bcc021b (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')
-rw-r--r-- | Documentation/markers.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Documentation/markers.txt b/Documentation/markers.txt index 6d275e4ef38..d2b3d0e91b2 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 activated by calling marker_arm(). Marker deactivation can be done by calling marker_disarm() as many times as marker_arm() has been called. Removing a probe is done through marker_probe_unregister(); it will disarm the probe. -marker_synchronize_unregister() must be called before the end of the module exit -function to make sure there is no caller left using the probe. This, and the -fact that preemption is disabled around the probe call, make sure that probe -removal and module unload are safe. See the "Probe example" section below for a -sample probe module. + +marker_synchronize_unregister() must be called between probe unregistration and +the first occurrence of +- the end of module exit function, + to make sure there is no caller left using the probe; +- the free of any resource used by the probes, + to make sure the probes wont be accessing invalid data. +This, and the fact that preemption is disabled around the probe call, make sure +that probe removal and module unload are safe. See the "Probe example" section +below for a sample probe module. The marker mechanism supports inserting multiple instances of the same marker. Markers can be put in inline functions, inlined static functions, and |