Esempio n. 1
0
static void ChannelFlushAll(int mode)
{
  int channel;
  for (channel = 0; channel < g_nchannels; channel ++)
  {
    if (ChannelGetStatus(channel))
    {
      ChannelStop(channel);
    }
  }
}
Esempio n. 2
0
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);
    }
  }
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
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;
}