1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 12:02:14 +00:00

ETHER: Fix additional race when closing a NAT(slirp) network connected device

This commit is contained in:
Mark Pizzolato
2019-08-23 23:55:41 -07:00
parent eaf34fe2c6
commit a031e69881
2 changed files with 6 additions and 2 deletions

View File

@@ -1902,9 +1902,9 @@ sim_debug(dev->dbit, dev->dptr, "Writer Thread Starting\n");
pthread_mutex_lock (&dev->writer_lock);
while (dev->handle) {
pthread_cond_wait (&dev->writer_cond, &dev->writer_lock);
if (dev->handle == NULL) /* Shutting down? */
break;
while (NULL != (request = dev->write_requests)) {
if (dev->handle == NULL) /* Shutting down? */
break;
/* Pull buffer off request list */
dev->write_requests = request->next;
pthread_mutex_unlock (&dev->writer_lock);