Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Feb 2001 23:52:19 -0500 (EST)
From:      Mike Heffner <mheffner@vt.edu>
To:        Jason Smethers <jsmethers@pdq.net>
Cc:        FreeBSD-audit <FreeBSD-audit@freebsd.org>
Subject:   RE: Convert taskqueue from splhigh() to mtx_*()
Message-ID:  <XFMail.20010201235219.mheffner@vt.edu>
In-Reply-To: <017a01c08cc7$8727ffe0$edcf1f40@pdq.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Minor point, but I think these three mtx_exit()'s need the address operator for
the mutex.


@@ -117,13 +131,13 @@
....
- -               splx(s);
+               mtx_exit(queue->tq_lock, MTX_DEF);
....
@@ -132,7 +146,7 @@
         */
        if (task->ta_pending) {
                task->ta_pending++;
- -               splx(s);
+               mtx_exit(queue->tq_lock, MTX_DEF);
                return 0;
        }
....
@@ -159,7 +174,7 @@
        if (queue->tq_enqueue)
                queue->tq_enqueue(queue->tq_context);
 
- -       splx(s);
+       mtx_exit(queue->tq_lock, MTX_DEF);
 
        return 0;
 }



On 02-Feb-2001 Jason Smethers wrote:
| The following patch converts taskqueue from spl[high,x]()'s to mtx_*()
| and adds appropriate sys[un]init functions in the hopes that one day
| these will be placeable in a throwaway ELF section. It is pretty much
| a straightforward spl -> mtx changeover. Other changes include some
| <sys/queue.h> usage simplification IMO, and I added a KASSERT() to
| taskqueue_free() but there is currently no consumer of this routine.
| 
| Currently there is only one consumer of taskqueue - the generic
| software interrupt taskqueue. The software interrupt taskqueue has
| four consumers: aac, acpica, amr, and mly.
| 
| The patch compiles, but is not tested with these consuming drivers.
| 
| http://64.31.203.118/~jason/FreeBSD-other/queue/patches/taskqueue.patc
| h
| 
| Thanks
| - Jason

- -- 

  Mike Heffner       <mheffner@vt.edu>
  Blacksburg, VA           ICQ# 882073
  http://filebox.vt.edu/users/mheffner

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6ej0DFokZQs3sv5kRAkcaAJ9hb1uN5mJod/OlqAehe++WUle5kgCfUyBL
rNvckarY8zsjKAWwijtxdvg=
=AwFt
-----END PGP SIGNATURE-----


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20010201235219.mheffner>