static void ChannelFlushAll(int mode) { int channel; for (channel = 0; channel < g_nchannels; channel ++) { if (ChannelGetStatus(channel)) { ChannelStop(channel); } } }
static void ChannelInvalidate(V3XA_HANDLE *sam) { int channel; for (channel = 0; channel < g_nchannels; channel ++) { if ((g_pchannels[channel].sam == sam) && (ChannelGetStatus(channel))) { ChannelStop(channel); } } }
BOOLEAN NTAPI ChannelIsActive(IN PSAC_CHANNEL Channel) { SAC_CHANNEL_STATUS ChannelStatus; BOOLEAN IsActive; /* Get the status */ if (!NT_SUCCESS(ChannelGetStatus(Channel, &ChannelStatus))) { /* We couldn't even do that, assume it's inactive */ IsActive = FALSE; } else { /* Check if the status shows activity */ IsActive = (ChannelStatus == Active); } /* Return the state */ return IsActive; }
BOOLEAN NTAPI ChannelIsClosed(IN PSAC_CHANNEL Channel) { SAC_CHANNEL_STATUS ChannelStatus; BOOLEAN IsClosed; /* Get the status */ if (!NT_SUCCESS(ChannelGetStatus(Channel, &ChannelStatus))) { /* We couldn't even do that, assume it's inactive */ IsClosed = FALSE; } else { /* Check if the status shows activity */ IsClosed = ((ChannelStatus == Inactive) && (Channel->ChannelHasNewOBufferData)); } /* Return the state */ return IsClosed; }