Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/sys/kern Make taskq_dispatch fail for no...



details:   https://anonhg.NetBSD.org/src/rev/61e40961014f
branches:  trunk
changeset: 807454:61e40961014f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Apr 11 00:13:04 2015 +0000

description:
Make taskq_dispatch fail for now with TQ_NOQUEUE; make caller retry.

diffstat:

 external/cddl/osnet/sys/kern/taskq.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r e89f03cd7226 -r 61e40961014f external/cddl/osnet/sys/kern/taskq.c
--- a/external/cddl/osnet/sys/kern/taskq.c      Sat Apr 11 00:11:40 2015 +0000
+++ b/external/cddl/osnet/sys/kern/taskq.c      Sat Apr 11 00:13:04 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: taskq.c,v 1.3 2013/06/21 16:22:46 christos Exp $       */
+/*     $NetBSD: taskq.c,v 1.4 2015/04/11 00:13:04 riastradh Exp $      */
 
 /*
  * CDDL HEADER START
@@ -721,6 +721,14 @@
        /*
         * TQ_NOQUEUE flag can't be used with non-dynamic task queues.
         */
+#ifdef __NetBSD__
+       /*
+        * Dynamic task queues didn't seem to get imported.  Caller
+        * must be prepared to handle failure anyway, so just fail.
+        */
+       if (flags & TQ_NOQUEUE)
+               return ((taskqid_t)NULL);
+#endif
        ASSERT(! (flags & TQ_NOQUEUE));
 
        /*



Home | Main Index | Thread Index | Old Index