ports/emulators/kqemu-kmod-devel/files/patch-kqemu-freebsd.c
Juergen Lock 3b32dcf4ec - add patch for recent -current that no longer uses sched_lock
- fix KERNCONF detection
- bump PORTREVISION

(There sill is that unresolved issue of the KSE/SMP CFLAGS not being
passed down to the build for one guy tho, even tho they do appear in
make -V CFLAGS...)
2007-07-21 19:38:16 +00:00

29 lines
717 B
C

Index: kqemu-freebsd.c
@@ -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);
+#if __FreeBSD_version >= 700024
+ dev_relthread(dev);
+#endif
destroy_dev(dev);
#endif
free(ks, M_KQEMU);