diff options
author | Juergen Lock <nox@FreeBSD.org> | 2007-07-21 19:38:16 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2007-07-21 19:38:16 +0000 |
commit | 3b32dcf4ec43e06102ee7512118ac1696c2b4ef2 (patch) | |
tree | f93351eab183618eb257c58df1c4f3167bb024d9 /emulators/kqemu-kmod | |
parent | 11c953071bde763f68ae24e0cac638f112db742d (diff) | |
download | ports-3b32dcf4ec43e06102ee7512118ac1696c2b4ef2.tar.gz ports-3b32dcf4ec43e06102ee7512118ac1696c2b4ef2.zip |
Notes
Diffstat (limited to 'emulators/kqemu-kmod')
-rw-r--r-- | emulators/kqemu-kmod/Makefile | 4 | ||||
-rw-r--r-- | emulators/kqemu-kmod/files/patch-kqemu-freebsd.c | 21 |
2 files changed, 21 insertions, 4 deletions
diff --git a/emulators/kqemu-kmod/Makefile b/emulators/kqemu-kmod/Makefile index fd58fd80dea0..149a93c741d1 100644 --- a/emulators/kqemu-kmod/Makefile +++ b/emulators/kqemu-kmod/Makefile @@ -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/ \ @@ -63,7 +63,7 @@ CFLAGS+= -DKSE # XXX the following is wrong if you run a custom SMP kernel on a # singleprocessor machine (but it probably doesn't really matter) -KERNCONF!= ${UNAME} -v | ${SED} 's-.*/--' +KERNCONF!= ${UNAME} -v | ${SED} 's-.*/--' | ${TR} -d ' ' NCPU!= ${SYSCTL} -n hw.ncpu 2>/dev/null # we know 7.x GENERIC has SMP .if ${KERNCONF} == "GENERIC" && ${OSVERSION} >= 700000 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); - |