summaryrefslogtreecommitdiffstats
path: root/win/tclWinInt.h
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-04-11 18:09:52 (GMT)
committersebres <sebres@users.sourceforge.net>2017-04-11 18:09:52 (GMT)
commit992af585dd13c64af68e50f9cad503afb6f0b1ed (patch)
treeee00c2a8984fdb59a627dcf91aa833b2bc168fe3 /win/tclWinInt.h
parent3ae2132f422286c745ba221dc1076475957fc2f8 (diff)
downloadtcl-992af585dd13c64af68e50f9cad503afb6f0b1ed.zip
tcl-992af585dd13c64af68e50f9cad503afb6f0b1ed.tar.gz
tcl-992af585dd13c64af68e50f9cad503afb6f0b1ed.tar.bz2
code review, robustness increase, avoid infinite wait by exit, thread exit and by pipes of closed processes);
use pipe-helpers (TI-structure handling) for all pipe-workers (tclWinConsole, tclWinSerial);
Diffstat (limited to 'win/tclWinInt.h')
-rw-r--r--win/tclWinInt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 67b00a8..86945a9 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -149,6 +149,14 @@ TclPipeThreadSignal(
}
};
+static inline int
+TclPipeThreadIsAlive(
+ TclPipeThreadInfo **pipeTIPtr)
+{
+ TclPipeThreadInfo *pipeTI = *pipeTIPtr;
+ return (pipeTI && pipeTI->state != PTI_STATE_DOWN);
+};
+
MODULE_SCOPE int TclPipeThreadStopSignal(TclPipeThreadInfo **pipeTIPtr, HANDLE wakeEvent);
MODULE_SCOPE void TclPipeThreadStop(TclPipeThreadInfo **pipeTIPtr, HANDLE hThread);
MODULE_SCOPE void TclPipeThreadExit(TclPipeThreadInfo **pipeTIPtr);