Assume TQ_SLEEP when not explicitly specified.

This commit is contained in:
Brian Behlendorf 2010-04-23 14:39:47 -07:00
parent 663e02a135
commit d05ec4b45f
1 changed files with 5 additions and 0 deletions

View File

@ -248,6 +248,11 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
ASSERT(tq); ASSERT(tq);
ASSERT(func); ASSERT(func);
/* Solaris assumes TQ_SLEEP if not passed explicitly */
if (!(flags & (TQ_SLEEP | TQ_NOSLEEP)))
flags |= TQ_SLEEP;
if (unlikely(in_atomic() && (flags & TQ_SLEEP))) { if (unlikely(in_atomic() && (flags & TQ_SLEEP))) {
CERROR("May schedule while atomic: %s/0x%08x/%d\n", CERROR("May schedule while atomic: %s/0x%08x/%d\n",
current->comm, preempt_count(), current->pid); current->comm, preempt_count(), current->pid);