aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-09-12 11:31:39 -0700
committerBrian Behlendorf <[email protected]>2012-09-12 11:41:42 -0700
commit9b51f218410ccdeb69a85d99bd5f09051ec2def1 (patch)
tree70dbe2457b1fd3c8717b7b76605831a250a0e7ec /include/sys
parent330fe010e42fcdbc70832583f95248b9227ac2c4 (diff)
Remove TQ_SLEEP -> KM_SLEEP mapping
When the taskq code was originally written it seemed like a good idea to simply map TQ_SLEEP to KM_SLEEP. Unfortunately, this assumed that the TQ_* flags would never confict with any of the Linux GFP_* flags. When adding the TQ_PUSHPAGE support in commit cd5ca4b this invariant was accidentally broken. Therefore to support TQ_PUSHPAGE, which is needed for Linux, and prevent any further confusion I have removed this direct mapping. The TQ_SLEEP, TQ_NOSLEEP, and TQ_PUSHPAGE are no longer defined in terms of their KM_* counterparts. Instead a simple mapping function is introduce to convert TQ_* -> KM_* where needed. Signed-off-by: Brian Behlendorf <[email protected]> Issue #171
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/taskq.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sys/taskq.h b/include/sys/taskq.h
index a5d9492f2..6b09bdf1b 100644
--- a/include/sys/taskq.h
+++ b/include/sys/taskq.h
@@ -60,8 +60,9 @@ typedef struct taskq_ent {
* KM_SLEEP/KM_NOSLEEP. TQ_NOQUEUE/TQ_NOALLOC are set particularly
* large so as not to conflict with already used GFP_* defines.
*/
-#define TQ_SLEEP KM_SLEEP
-#define TQ_NOSLEEP KM_NOSLEEP
+#define TQ_SLEEP 0x00000000
+#define TQ_NOSLEEP 0x00000001
+#define TQ_PUSHPAGE 0x00000002
#define TQ_NOQUEUE 0x01000000
#define TQ_NOALLOC 0x02000000
#define TQ_NEW 0x04000000