aboutsummaryrefslogtreecommitdiff
path: root/emulators/kqemu-kmod/files
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2007-07-21 19:38:16 +0000
committerJuergen Lock <nox@FreeBSD.org>2007-07-21 19:38:16 +0000
commit3b32dcf4ec43e06102ee7512118ac1696c2b4ef2 (patch)
treef93351eab183618eb257c58df1c4f3167bb024d9 /emulators/kqemu-kmod/files
parent11c953071bde763f68ae24e0cac638f112db742d (diff)
Notes
Diffstat (limited to 'emulators/kqemu-kmod/files')
-rw-r--r--emulators/kqemu-kmod/files/patch-kqemu-freebsd.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c b/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c
index a2b1cb61c380..73e23f4b7d24 100644
--- a/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c
+++ b/emulators/kqemu-kmod/files/patch-kqemu-freebsd.c
@@ -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 @@ Index: kqemu-freebsd.c
destroy_dev(dev);
#endif
free(ks, M_KQEMU);
-