From owner-freebsd-audit Thu Feb 1 20:52:39 2001 Delivered-To: freebsd-audit@freebsd.org Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.161.193]) by hub.freebsd.org (Postfix) with ESMTP id 8DA7E37B4EC for ; Thu, 1 Feb 2001 20:52:21 -0800 (PST) Received: from mail.vt.edu (gkar.cc.vt.edu [198.82.161.190]) by lennier.cc.vt.edu (8.11.0/8.11.0) with ESMTP id f124qKu219470; Thu, 1 Feb 2001 23:52:20 -0500 (EST) Received: from enterprise.muriel.penguinpowered.com ([198.82.100.151]) by gkar.cc.vt.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0G8400LQW5J7OI@gkar.cc.vt.edu>; Thu, 1 Feb 2001 23:52:19 -0500 (EST) Date: Thu, 01 Feb 2001 23:52:19 -0500 (EST) From: Mike Heffner Subject: RE: Convert taskqueue from splhigh() to mtx_*() In-reply-to: <017a01c08cc7$8727ffe0$edcf1f40@pdq.net> To: Jason Smethers Cc: FreeBSD-audit Message-id: MIME-version: 1.0 X-Mailer: XFMail 1.4.6-3 on FreeBSD Content-type: application/pgp; format=text; x-action=sign Content-description: signed PGP message Content-transfer-encoding: 8bit X-Priority: 3 (Normal) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----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 | 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 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