diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:57:12 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:57:12 (GMT) |
| commit | ae73bae096e79e0d8031278d53738217c8eda75c (patch) | |
| tree | c5ed99f48930c731fa61f95e6ed1d54e570be4d5 /unix/tclSelectNotfy.c | |
| parent | 7bc7f4397fe3edbdbc6136f6cbe223b3704a054e (diff) | |
| parent | ce025f259b91e61857e70c6690d5db631b5dc747 (diff) | |
| download | tcl-ae73bae096e79e0d8031278d53738217c8eda75c.zip tcl-ae73bae096e79e0d8031278d53738217c8eda75c.tar.gz tcl-ae73bae096e79e0d8031278d53738217c8eda75c.tar.bz2 | |
merge 8.7
Diffstat (limited to 'unix/tclSelectNotfy.c')
| -rw-r--r-- | unix/tclSelectNotfy.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index 4bdfaef..58dc742 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -11,7 +11,7 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#if !defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE) +#if (!defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE)) || !TCL_THREADS #include "tclInt.h" #ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is @@ -81,7 +81,7 @@ typedef struct ThreadSpecificData { int numFdBits; /* Number of valid bits in checkMasks (one * more than highest fd for which * Tcl_WatchFile has been called). */ -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS int onList; /* True if it is in this list */ unsigned int pollState; /* pollState is used to implement a polling * handshake between each thread and the @@ -112,7 +112,7 @@ typedef struct ThreadSpecificData { static Tcl_ThreadDataKey dataKey; -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* * The following static indicates the number of threads that have initialized * notifiers. @@ -193,7 +193,7 @@ static Tcl_ThreadId notifierThread; * Static routines defined in this file. */ -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS static TCL_NORETURN void NotifierThreadProc(ClientData clientData); #if defined(HAVE_PTHREAD_ATFORK) static int atForkInit = 0; @@ -285,7 +285,7 @@ Tcl_InitNotifier(void) } else { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS tsdPtr->eventReady = 0; /* @@ -370,7 +370,7 @@ Tcl_FinalizeNotifier( tclNotifierHooks.finalizeNotifierProc(clientData); return; } else { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); pthread_mutex_lock(¬ifierInitMutex); @@ -640,7 +640,7 @@ Tcl_WaitForEvent( FileHandler *filePtr; int mask; Tcl_Time vTime; -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS int waitForFiles; # ifdef __CYGWIN__ MSG msg; @@ -675,7 +675,7 @@ Tcl_WaitForEvent( tclScaleTimeProcPtr(&vTime, tclTimeClientData); timePtr = &vTime; } -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS timeout.tv_sec = timePtr->sec; timeout.tv_usec = timePtr->usec; timeoutPtr = &timeout; @@ -694,7 +694,7 @@ Tcl_WaitForEvent( #endif /* !TCL_THREADS */ } -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* * Start notifier thread and place this thread on the list of * interested threads, signal the notifier thread, and wait for a @@ -885,14 +885,14 @@ Tcl_WaitForEvent( } filePtr->readyMask = mask; } -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS pthread_mutex_unlock(¬ifierMutex); #endif /* TCL_THREADS */ return 0; } } -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* *---------------------------------------------------------------------- |
