virtualbox-ose-kmod breakage after svn r218425
Jung-uk Kim
jkim at FreeBSD.org
Wed Feb 9 19:27:07 UTC 2011
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
-------------- next part --------------
--- 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 ... */
}
More information about the freebsd-emulation
mailing list