SCP: Assure that file buffers get flushed during frontpanel API halts
As reported in #668
This commit is contained in:
parent
c7b0928b33
commit
4b82a90c43
3 changed files with 3 additions and 2 deletions
2
scp.c
2
scp.c
|
@ -558,7 +558,6 @@ t_stat sim_set_asynch (int32 flag, CONST char *cptr);
|
|||
static const char *_get_dbg_verb (uint32 dbits, DEVICE* dptr, UNIT *uptr);
|
||||
static t_stat sim_library_unit_tests (void);
|
||||
static t_stat _sim_debug_flush (void);
|
||||
static void sim_flush_buffered_files (void);
|
||||
|
||||
/* Global data */
|
||||
|
||||
|
@ -7698,7 +7697,6 @@ if (warned)
|
|||
return r;
|
||||
}
|
||||
|
||||
static
|
||||
void sim_flush_buffered_files (void)
|
||||
{
|
||||
uint32 i, j;
|
||||
|
|
1
scp.h
1
scp.h
|
@ -326,6 +326,7 @@ void _sim_debug_device (uint32 dbits, DEVICE* dptr, const char* fmt, ...) GCC_FM
|
|||
#define sim_debug(dbits, dptr, ...) do { if (sim_deb && dptr && ((dptr)->dctrl & (dbits))) _sim_debug_device (dbits, dptr, __VA_ARGS__);} while (0)
|
||||
#define sim_debug_unit(dbits, uptr, ...) do { if (sim_deb && uptr && (((uptr)->dctrl | (uptr)->dptr->dctrl) & (dbits))) _sim_debug_unit (dbits, uptr, __VA_ARGS__);} while (0)
|
||||
#endif
|
||||
void sim_flush_buffered_files (void);
|
||||
|
||||
void fprint_stopped_gen (FILE *st, t_stat v, REG *pc, DEVICE *dptr);
|
||||
#define SCP_HELP_FLAT (1u << 31) /* Force flat help when prompting is not possible */
|
||||
|
|
|
@ -1412,6 +1412,7 @@ for (i=(was_active_command ? sim_rem_cmd_active_line : 0);
|
|||
sim_is_running = FALSE;
|
||||
sim_rem_collect_all_registers ();
|
||||
sim_stop_timer_services ();
|
||||
sim_flush_buffered_files ();
|
||||
if (rem->act == NULL) {
|
||||
for (j=0; j < sim_rem_con_tmxr.lines; j++) {
|
||||
TMLN *lpj = &sim_rem_con_tmxr.ldsc[j];
|
||||
|
@ -1437,6 +1438,7 @@ for (i=(was_active_command ? sim_rem_cmd_active_line : 0);
|
|||
sim_is_running = FALSE;
|
||||
sim_rem_collect_all_registers ();
|
||||
sim_stop_timer_services ();
|
||||
sim_flush_buffered_files ();
|
||||
stat = SCPE_STOP;
|
||||
_sim_rem_message ("RUN", stat);
|
||||
_sim_rem_log_out (lp);
|
||||
|
|
Loading…
Add table
Reference in a new issue