Print this page
10098 task_alloc() in libfakekernel gets KM_NOSLEEP test wrong

@@ -98,11 +98,11 @@
 
 again:  if ((t = tq->tq_freelist) != NULL && tq->tq_nalloc >= tq->tq_minalloc) {
                 tq->tq_freelist = t->tqent_next;
         } else {
                 if (tq->tq_nalloc >= tq->tq_maxalloc) {
-                        if (!(tqflags & KM_SLEEP))
+                        if (tqflags & KM_NOSLEEP)
                                 return (NULL);
 
                         /*
                          * We don't want to exceed tq_maxalloc, but we can't
                          * wait for other tasks to complete (and thus free up