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/tclUnixNotfy.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/tclUnixNotfy.c')
-rw-r--r-- | unix/tclUnixNotfy.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index ccae39b..062d817 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -17,24 +17,24 @@ * Static routines defined in this file. */ -#ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS +static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +#if !TCL_THREADS +# undef NOTIFIER_EPOLL +# undef NOTIFIER_KQUEUE +# define NOTIFIER_SELECT +#elif !defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE) +# define NOTIFIER_SELECT static TCL_NORETURN void NotifierThreadProc(ClientData clientData); -#if defined(HAVE_PTHREAD_ATFORK) +# if defined(HAVE_PTHREAD_ATFORK) static void AtForkChild(void); -#endif /* HAVE_PTHREAD_ATFORK */ -#endif /* TCL_THREADS */ -#endif /* NOTIFIER_SELECT */ -static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +# endif /* HAVE_PTHREAD_ATFORK */ -#ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS /* *---------------------------------------------------------------------- * * StartNotifierThread -- * - * Start a notfier thread and wait for the notifier pipe to be created. + * Start a notifier thread and wait for the notifier pipe to be created. * * Results: * None. @@ -70,7 +70,6 @@ StartNotifierThread(const char *proc) pthread_mutex_unlock(¬ifierInitMutex); } } -#endif /* TCL_THREADS */ #endif /* NOTIFIER_SELECT */ /* @@ -107,7 +106,7 @@ Tcl_AlertNotifier( return; } else { #ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS ThreadSpecificData *tsdPtr = clientData; pthread_mutex_lock(¬ifierMutex); @@ -198,7 +197,7 @@ Tcl_ServiceModeHook( return; } else if (mode == TCL_SERVICE_ALL) { #ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS StartNotifierThread("Tcl_ServiceModeHook"); #endif #endif /* NOTIFIER_SELECT */ @@ -280,7 +279,7 @@ FileHandlerEventProc( } #ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* *---------------------------------------------------------------------- * |