From owner-freebsd-emulation@FreeBSD.ORG Wed Feb 9 19:27:07 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 55059106566B; Wed, 9 Feb 2011 19:27:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Wed, 9 Feb 2011 14:26:55 -0500 User-Agent: KMail/1.6.2 References: <4D52E45E.4040505@protected-networks.net> <4D52E51F.8080304@protected-networks.net> In-Reply-To: <4D52E51F.8080304@protected-networks.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_BquUNeUXVU/HjRl" Message-Id: <201102091426.57152.jkim@FreeBSD.org> Cc: Subject: Re: virtualbox-ose-kmod breakage after svn r218425 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: Wed, 09 Feb 2011 19:27:07 -0000 --Boundary-00=_BquUNeUXVU/HjRl Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 09 February 2011 02:03 pm, Michael Butler wrote: > On 02/09/11 14:00, Michael Butler wrote: > > Attached is a patch required for vboxdrv.ko to load after the > > (public) disappearance of uio_yield. > > > > Presumably, this will need to be applied to the other branches at > > bluelife.at > > > > imb > > Mailman ate my homework! > > *** ./src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c~ Wed > Dec 1 12:09:43 2010 > --- ./src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c Wed > Feb 9 13:44:28 2011 > *************** > *** 101,107 **** > --- 101,111 ---- > > RTDECL(bool) RTThreadYield(void) > { > + #if (__FreeBSD_version >= 900032) > + kern_yield(curthread->td_user_pri); > + #else > uio_yield(); > + #endif > return false; /** @todo figure this one ... */ > } Actually I did the same thing last night. Please see the attachment. Jung-uk Kim --Boundary-00=_BquUNeUXVU/HjRl Content-Type: text/plain; charset="iso-8859-1"; name="patch-uio_yield" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-uio_yield" --- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig 2010-12-01 12:09:43.000000000 -0500 +++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2011-02-08 18:19:00.000000000 -0500 @@ -112,4 +112,13 @@ # define USE_KMEM_ALLOC_PROT #endif +/** + * Check whether we can use uio_yield. + */ +#if __FreeBSD_version >= 900032 +# define UIO_YIELD() kern_yield(curthread->td_user_pri) +#else +# define UIO_YIELD() uio_yield() +#endif + #endif --- src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c.orig 2010-12-01 12:09:43.000000000 -0500 +++ src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c 2011-02-08 18:19:00.000000000 -0500 @@ -101,7 +101,7 @@ RTDECL(bool) RTThreadYield(void) { - uio_yield(); + UIO_YIELD(); return false; /** @todo figure this one ... */ } --Boundary-00=_BquUNeUXVU/HjRl--