summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tclDecls.h12
-rw-r--r--generic/tclStubInit.c4
-rw-r--r--macosx/tclMacOSXNotify.c25
4 files changed, 28 insertions, 15 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index cec3354..5d2fc62 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2428,7 +2428,7 @@ declare 657 {
}
# TIP #511
-declare 658 {
+declare 660 {
int Tcl_AsyncMarkFromSignal(Tcl_AsyncHandler async, int sigNumber)
}
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 637ed06..7d2e202 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1939,7 +1939,9 @@ EXTERN const char * Tcl_UtfNext(const char *src);
EXTERN const char * Tcl_UtfPrev(const char *src, const char *start);
/* 657 */
EXTERN int Tcl_UniCharIsUnicode(int ch);
-/* 658 */
+/* Slot 658 is reserved */
+/* Slot 659 is reserved */
+/* 660 */
EXTERN int Tcl_AsyncMarkFromSignal(Tcl_AsyncHandler async,
int sigNumber);
@@ -2635,7 +2637,9 @@ typedef struct TclStubs {
const char * (*tcl_UtfNext) (const char *src); /* 655 */
const char * (*tcl_UtfPrev) (const char *src, const char *start); /* 656 */
int (*tcl_UniCharIsUnicode) (int ch); /* 657 */
- int (*tcl_AsyncMarkFromSignal) (Tcl_AsyncHandler async, int sigNumber); /* 658 */
+ void (*reserved658)(void);
+ void (*reserved659)(void);
+ int (*tcl_AsyncMarkFromSignal) (Tcl_AsyncHandler async, int sigNumber); /* 660 */
} TclStubs;
extern const TclStubs *tclStubsPtr;
@@ -3980,8 +3984,10 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_UtfPrev) /* 656 */
#define Tcl_UniCharIsUnicode \
(tclStubsPtr->tcl_UniCharIsUnicode) /* 657 */
+/* Slot 658 is reserved */
+/* Slot 659 is reserved */
#define Tcl_AsyncMarkFromSignal \
- (tclStubsPtr->tcl_AsyncMarkFromSignal) /* 658 */
+ (tclStubsPtr->tcl_AsyncMarkFromSignal) /* 660 */
#endif /* defined(USE_TCL_STUBS) */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 64e63ea..66cf7b2 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -1942,7 +1942,9 @@ const TclStubs tclStubs = {
Tcl_UtfNext, /* 655 */
Tcl_UtfPrev, /* 656 */
Tcl_UniCharIsUnicode, /* 657 */
- Tcl_AsyncMarkFromSignal, /* 658 */
+ 0, /* 658 */
+ 0, /* 659 */
+ Tcl_AsyncMarkFromSignal, /* 660 */
};
/* !END!: Do not edit above this line. */
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 */