aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_task.h
diff options
context:
space:
mode:
authorZachary Loafman <zml@FreeBSD.org>2010-05-28 18:15:28 +0000
committerZachary Loafman <zml@FreeBSD.org>2010-05-28 18:15:28 +0000
commit6e86cdb85ccaf1a76bba946d0b5883f058c5d9a1 (patch)
treece37781afaa60be1da1b396cd15e2580d5d323b7 /sys/sys/_task.h
parentdbd9a3aab383211156a1a85bddc60395f9c2d1cd (diff)
downloadsrc-6e86cdb85ccaf1a76bba946d0b5883f058c5d9a1.tar.gz
src-6e86cdb85ccaf1a76bba946d0b5883f058c5d9a1.zip
Revert r207439 and solve the problem differently. The task handler
ta_func may free the task structure, so no references to its members are valid after the handler has been called. Using a per-queue member and having waits longer than strictly necessary was suggested by jhb. Submitted by: Matthew Fleming <matthew.fleming@isilon.com> Reviewed by: zml, jhb
Notes
Notes: svn path=/head/; revision=208623
Diffstat (limited to 'sys/sys/_task.h')
-rw-r--r--sys/sys/_task.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/sys/_task.h b/sys/sys/_task.h
index 781cd48cf657..68e236f95554 100644
--- a/sys/sys/_task.h
+++ b/sys/sys/_task.h
@@ -45,8 +45,6 @@ typedef void task_fn_t(void *context, int pending);
struct task {
STAILQ_ENTRY(task) ta_link; /* (q) link for queue */
- u_int ta_flags; /* (q) state of this task */
-#define TA_FLAGS_RUNNING 0x01
u_short ta_pending; /* (q) count times queued */
u_short ta_priority; /* (c) Priority */
task_fn_t *ta_func; /* (c) task handler */