Assume TQ_SLEEP when not explicitly specified.
This commit is contained in:
parent
663e02a135
commit
d05ec4b45f
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue