mirror of
https://github.com/simh/simh.git
synced 2026-01-27 12:32:24 +00:00
ETHER: Make sure SET NOASYNC is effective for Ethernet devices
- Make sure that asynchronous mode can't be changed if devices using sim_ether are already attached. - Add missing DEV_ETHER type flag for the only sim_ether using device that didn't already have it.
This commit is contained in:
10
sim_ether.c
10
sim_ether.c
@@ -2218,6 +2218,10 @@ return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* eth_set_async
|
||||
*
|
||||
* Turn on reciever processing which can be either asynchronous or polled
|
||||
*/
|
||||
t_stat eth_set_async (ETH_DEV *dev, int latency)
|
||||
{
|
||||
#if !defined(USE_READER_THREAD) || !defined(SIM_ASYNCH_IO)
|
||||
@@ -2227,7 +2231,7 @@ return sim_messagef (SCPE_NOFNC, "%s", msg);
|
||||
#else
|
||||
int wakeup_needed;
|
||||
|
||||
dev->asynch_io = 1;
|
||||
dev->asynch_io = sim_asynch_enabled;
|
||||
dev->asynch_io_latency = latency;
|
||||
pthread_mutex_lock (&dev->lock);
|
||||
wakeup_needed = (dev->read_queue.count != 0);
|
||||
@@ -2240,6 +2244,10 @@ if (wakeup_needed) {
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* eth_clr_async
|
||||
*
|
||||
* Turn off reciever processing
|
||||
*/
|
||||
t_stat eth_clr_async (ETH_DEV *dev)
|
||||
{
|
||||
#if !defined(USE_READER_THREAD) || !defined(SIM_ASYNCH_IO)
|
||||
|
||||
Reference in New Issue
Block a user