summaryrefslogtreecommitdiffstats
path: root/sim/ppc/sim_calls.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
commit7a292a7adf506b866905b06b3024c0fd411c4583 (patch)
tree5b208bb48269b8a82d5c3a5f19c87b45a62a22f4 /sim/ppc/sim_calls.c
parent1996fae84682e8ddd146215dd2959ad1ec924c09 (diff)
downloadppe42-binutils-7a292a7adf506b866905b06b3024c0fd411c4583.tar.gz
ppe42-binutils-7a292a7adf506b866905b06b3024c0fd411c4583.zip
import gdb-19990422 snapshot
Diffstat (limited to 'sim/ppc/sim_calls.c')
-rw-r--r--sim/ppc/sim_calls.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index bb84539715..15df3c50d0 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -45,6 +45,13 @@
#include "callback.h"
#include "remote-sim.h"
+/* Define the rate at which the simulator should poll the host
+ for a quit. */
+#ifndef POLL_QUIT_INTERVAL
+#define POLL_QUIT_INTERVAL 0x20
+#endif
+
+static int poll_quit_count = POLL_QUIT_INTERVAL;
/* Structures used by the simulator, for gdb just have static structures */
@@ -324,8 +331,9 @@ sim_do_command (SIM_DESC sd, char *cmd)
void
sim_io_poll_quit (void)
{
- if (callbacks->poll_quit != NULL)
+ if (callbacks->poll_quit != NULL && poll_quit_count-- < 0)
{
+ poll_quit_count = POLL_QUIT_INTERVAL;
if (callbacks->poll_quit (callbacks))
psim_stop (simulator);
}
OpenPOWER on IntegriCloud