aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/slow-work.txt
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:10:23 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:10:23 -0500
commit3d7a641e544e428191667e8b1f83f96fa46dbd65 (patch)
tree172aa672eca96b94f5531885b82abb82b43c7d8a /Documentation/slow-work.txt
parent66b00a7c93ec782d118d2c03bd599cfd041e80a1 (diff)
SLOW_WORK: Wait for outstanding work items belonging to a module to clear
Wait for outstanding slow work items belonging to a module to clear when unregistering that module as a user of the facility. This prevents the put_ref code of a work item from being taken away before it returns. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/slow-work.txt')
-rw-r--r--Documentation/slow-work.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt
index ebc50f808ea4..f12fda31dcdc 100644
--- a/Documentation/slow-work.txt
+++ b/Documentation/slow-work.txt
@@ -64,9 +64,11 @@ USING SLOW WORK ITEMS
64Firstly, a module or subsystem wanting to make use of slow work items must 64Firstly, a module or subsystem wanting to make use of slow work items must
65register its interest: 65register its interest:
66 66
67 int ret = slow_work_register_user(); 67 int ret = slow_work_register_user(struct module *module);
68 68
69This will return 0 if successful, or a -ve error upon failure. 69This will return 0 if successful, or a -ve error upon failure. The module
70pointer should be the module interested in using this facility (almost
71certainly THIS_MODULE).
70 72
71 73
72Slow work items may then be set up by: 74Slow work items may then be set up by:
@@ -110,7 +112,12 @@ operation. When all a module's slow work items have been processed, and the
110module has no further interest in the facility, it should unregister its 112module has no further interest in the facility, it should unregister its
111interest: 113interest:
112 114
113 slow_work_unregister_user(); 115 slow_work_unregister_user(struct module *module);
116
117The module pointer is used to wait for all outstanding work items for that
118module before completing the unregistration. This prevents the put_ref() code
119from being taken away before it completes. module should almost certainly be
120THIS_MODULE.
114 121
115 122
116=============== 123===============