1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
|
*----------------------------------------------------------------------
*/
static void
ConsoleWatchProc(
void *instanceData, /* Console state. */
int newMask) /* What events to watch for, one of
* of TCL_READABLE, TCL_WRITABLE */
{
ConsoleChannelInfo **nextPtrPtr, *ptr;
ConsoleChannelInfo *chanInfoPtr = (ConsoleChannelInfo *)instanceData;
int oldMask = chanInfoPtr->watchMask;
/*
* Since most of the work is handled by the background threads, we just
|
|
|
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
|
*----------------------------------------------------------------------
*/
static void
ConsoleWatchProc(
void *instanceData, /* Console state. */
int newMask) /* What events to watch for, one of
* TCL_READABLE, TCL_WRITABLE */
{
ConsoleChannelInfo **nextPtrPtr, *ptr;
ConsoleChannelInfo *chanInfoPtr = (ConsoleChannelInfo *)instanceData;
int oldMask = chanInfoPtr->watchMask;
/*
* Since most of the work is handled by the background threads, we just
|
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
|
consoleHandle = handleInfoPtr->console;
ReleaseSRWLockExclusive(&handleInfoPtr->lock);
NudgeWatchers(consoleHandle);
AcquireSRWLockExclusive(&handleInfoPtr->lock);
/*
* Loop back to recheck for exit conditions changes while the
* the lock was not held.
*/
continue;
}
assert(inputLen == 0);
/*
|
|
|
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
|
consoleHandle = handleInfoPtr->console;
ReleaseSRWLockExclusive(&handleInfoPtr->lock);
NudgeWatchers(consoleHandle);
AcquireSRWLockExclusive(&handleInfoPtr->lock);
/*
* Loop back to recheck for exit conditions changes while the
* lock was not held.
*/
continue;
}
assert(inputLen == 0);
/*
|