From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 20 21:33:54 2007 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5D416A418 for ; Fri, 20 Jul 2007 21:33:54 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 041DD13C45E for ; Fri, 20 Jul 2007 21:33:53 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 398131FDA54; Fri, 20 Jul 2007 23:33:52 +0200 (CEST) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.8/8.13.6) with ESMTP id l6KLWB8N007411; Fri, 20 Jul 2007 23:32:11 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.8/8.13.6/Submit) id l6KLWBaq007410; Fri, 20 Jul 2007 23:32:11 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 20 Jul 2007 23:32:11 +0200 To: freebsd-current@FreeBSD.org, freebsd-emulation@FreeBSD.org Message-ID: <20070720213211.GA7262@saturn.kn-bremen.de> Mail-Followup-To: freebsd-current@FreeBSD.org, freebsd-emulation@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: kqemu and sched_lock, please test port update X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 21:33:54 -0000 I just noticed this, and came up with the update below. I still don't have a -current box so I need you to test this before I commit it... Thanx, Juergen Index: Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/kqemu-kmod/Makefile,v retrieving revision 1.19 diff -u -r1.19 Makefile --- Makefile 14 Jul 2007 17:48:56 -0000 1.19 +++ Makefile 20 Jul 2007 21:21:14 -0000 @@ -7,7 +7,7 @@ PORTNAME= kqemu PORTVERSION= 1.3.0.p11 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators kld MASTER_SITES= http://fabrice.bellard.free.fr/qemu/ \ http://qemu.org/ \ Index: files/patch-kqemu-freebsd.c =================================================================== RCS file: /home/pcvs/ports/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c,v retrieving revision 1.5 diff -u -r1.5 patch-kqemu-freebsd.c --- files/patch-kqemu-freebsd.c 6 Feb 2007 20:46:29 -0000 1.5 +++ files/patch-kqemu-freebsd.c 20 Jul 2007 21:17:33 -0000 @@ -1,5 +1,23 @@ Index: kqemu-freebsd.c -@@ -321,6 +321,9 @@ +@@ -208,9 +208,17 @@ + int CDECL kqemu_schedule(void) + { + /* kqemu_log("kqemu_schedule\n"); */ ++#if __FreeBSD_version < 700044 + mtx_lock_spin(&sched_lock); + mi_switch(SW_VOL, NULL); + mtx_unlock_spin(&sched_lock); ++#else ++ /* -current no longer uses sched_lock */ ++ struct thread *td = curthread; ++ thread_lock(td); ++ mi_switch(SW_VOL, NULL); ++ thread_unlock(td); ++#endif + return SIGPENDING(curthread); + } + #endif +@@ -320,6 +328,9 @@ #if __FreeBSD_version >= 500000 dev->si_drv1 = NULL; TAILQ_REMOVE(&kqemuhead, ks, kqemu_ent); @@ -9,4 +27,3 @@ destroy_dev(dev); #endif free(ks, M_KQEMU); -