summaryrefslogtreecommitdiffstats
path: root/win/tclWinInt.h
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-04-11 18:09:38 (GMT)
committersebres <sebres@users.sourceforge.net>2017-04-11 18:09:38 (GMT)
commit3ae2132f422286c745ba221dc1076475957fc2f8 (patch)
treebe6e5da4778b6aa37ca13dee64c9efc98a8cdf5d /win/tclWinInt.h
parent95c20cdf7698c12442ecf63633179f9ffd48ad76 (diff)
downloadtcl-3ae2132f422286c745ba221dc1076475957fc2f8.zip
tcl-3ae2132f422286c745ba221dc1076475957fc2f8.tar.gz
tcl-3ae2132f422286c745ba221dc1076475957fc2f8.tar.bz2
added wake-up event to prevent possible dead-locks by some waiting thread (e. g. for writable events)
Diffstat (limited to 'win/tclWinInt.h')
-rw-r--r--win/tclWinInt.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 8ce4152..67b00a8 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -110,6 +110,7 @@ typedef struct TclPipeThreadInfo {
* used as signal to stop (state set to -1) */
volatile LONG state; /* Indicates current state of the thread */
ClientData clientData; /* Referenced data of the main thread */
+ HANDLE evWakeUp; /* Optional wake-up event worker set by shutdown */
} TclPipeThreadInfo;
@@ -134,7 +135,8 @@ typedef struct TclPipeThreadInfo {
MODULE_SCOPE
-TclPipeThreadInfo * TclPipeThreadCreateTI(TclPipeThreadInfo **pipeTIPtr, ClientData clientData);
+TclPipeThreadInfo * TclPipeThreadCreateTI(TclPipeThreadInfo **pipeTIPtr,
+ ClientData clientData, HANDLE wakeEvent);
MODULE_SCOPE int TclPipeThreadWaitForSignal(TclPipeThreadInfo **pipeTIPtr);
static inline void
@@ -147,7 +149,7 @@ TclPipeThreadSignal(
}
};
-MODULE_SCOPE int TclPipeThreadStopSignal(TclPipeThreadInfo **pipeTIPtr);
+MODULE_SCOPE int TclPipeThreadStopSignal(TclPipeThreadInfo **pipeTIPtr, HANDLE wakeEvent);
MODULE_SCOPE void TclPipeThreadStop(TclPipeThreadInfo **pipeTIPtr, HANDLE hThread);
MODULE_SCOPE void TclPipeThreadExit(TclPipeThreadInfo **pipeTIPtr);