mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 13:50:38 -04:00
25 lines
851 B
Text
25 lines
851 B
Text
Index: common/kernel.c
|
|
@@ -1079,6 +1079,10 @@ long kqemu_exec(struct kqemu_state *s)
|
|
uint16_t saved_ds, saved_es;
|
|
unsigned long fs_base, gs_base;
|
|
#endif
|
|
+#if defined(__FreeBSD__)
|
|
+ extern int ticks;
|
|
+ int tstart = ticks;
|
|
+#endif
|
|
|
|
#ifdef PROFILE
|
|
s->nb_profile_ts = 0;
|
|
@@ -1252,7 +1256,11 @@ long kqemu_exec(struct kqemu_state *s)
|
|
/* if interrupting user code, we schedule to give time
|
|
to the other processes. We can be interrupted by a
|
|
signal a that case. */
|
|
- if (kqemu_schedule()) {
|
|
+ if (kqemu_schedule()
|
|
+#if defined(__FreeBSD__)
|
|
+ || ticks - tstart > 1
|
|
+#endif
|
|
+ ) {
|
|
restore_cpu_state_from_regs(s, r);
|
|
ret = KQEMU_RET_INTR;
|
|
break;
|