Fixed issue where asynchronous I/O wouldn't be reliable after a device reset.

This commit is contained in:
Mark Pizzolato 2012-04-28 08:37:20 -07:00
parent 784f0542f2
commit c4659a0903
2 changed files with 2 additions and 0 deletions

View file

@ -428,6 +428,7 @@ if (ctx->asynch_io) {
pthread_create (&ctx->io_thread, &attr, _disk_io, (void *)uptr); pthread_create (&ctx->io_thread, &attr, _disk_io, (void *)uptr);
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
uptr->a_check_completion = _disk_completion_dispatch; uptr->a_check_completion = _disk_completion_dispatch;
sim_os_ms_sleep(50); /* Give the _disk_io thread a chance to stabilize */
} }
#endif #endif
return SCPE_OK; return SCPE_OK;

View file

@ -335,6 +335,7 @@ if (ctx->asynch_io) {
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
pthread_create (&ctx->io_thread, &attr, _tape_io, (void *)uptr); pthread_create (&ctx->io_thread, &attr, _tape_io, (void *)uptr);
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
sim_os_ms_sleep(50); /* Give the _tape_io thread a chance to stabilize */
} }
uptr->a_check_completion = _tape_completion_dispatch; uptr->a_check_completion = _tape_completion_dispatch;
#endif #endif