diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-08-19 08:05:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-08-19 08:05:47 (GMT) |
commit | d296d56f3640aec2b135f6d4a6fce255cb90a5fa (patch) | |
tree | afb1901b977a0f55d2667f03b8a0db1f6ac4f395 /macosx | |
parent | f69a86b7146ddfe59ba45c2ef1741d9d25121a6e (diff) | |
download | tcl-d296d56f3640aec2b135f6d4a6fce255cb90a5fa.zip tcl-d296d56f3640aec2b135f6d4a6fce255cb90a5fa.tar.gz tcl-d296d56f3640aec2b135f6d4a6fce255cb90a5fa.tar.bz2 |
Apply macos-tip511.diff. Resolve conflict with TIP #601
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tclMacOSXNotify.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 35e6ae8..d7c4d7f 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -1907,7 +1907,7 @@ TclUnixWaitForFile( int TclAsyncNotifier( int sigNumber, /* Signal number. */ - Tcl_ThreadId threadId, /* Target thread. */ + TCL_UNUSED(Tcl_ThreadId), /* Target thread. */ TCL_UNUSED(ClientData), /* Notifier data. */ int *flagPtr, /* Flag to mark. */ int value) /* Value of mark. */ @@ -2221,12 +2221,17 @@ AtForkChild(void) */ #if defined(USE_OS_UNFAIR_LOCK) - tsdPtr->tsdLock = OS_UNFAIR_LOCK_INIT; + notifierInitLock = OS_UNFAIR_LOCK_INIT; + notifierLock = OS_UNFAIR_LOCK_INIT; + tsdPtr->tsdLock = OS_UNFAIR_LOCK_INIT; #else - UNLOCK_NOTIFIER_TSD; - UNLOCK_NOTIFIER; - UNLOCK_NOTIFIER_INIT; + UNLOCK_NOTIFIER_TSD; + UNLOCK_NOTIFIER; + UNLOCK_NOTIFIER_INIT; #endif + + asyncPending = 0; + if (tsdPtr->runLoop) { tsdPtr->runLoop = NULL; if (!noCFafterFork) { @@ -2256,13 +2261,13 @@ AtForkChild(void) if (!noCFafterFork) { Tcl_InitNotifier(); } - } - /* - * Restart the notifier thread for signal handling. - */ + /* + * Restart the notifier thread for signal handling. + */ - StartNotifierThread(); + StartNotifierThread(); + } } #endif /* HAVE_PTHREAD_ATFORK */ |