summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-03-24 09:33:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-03-24 09:33:00 (GMT)
commit1749f80a0818eb09d3657e5d1c9038c031d9e30e (patch)
treee71db6985fb4fce2dd3c41df8177770c0510d8a1
parentb97fb3b2fa5d09e78d3ae457a3371c6ac4db1ec3 (diff)
downloadtcl-1749f80a0818eb09d3657e5d1c9038c031d9e30e.zip
tcl-1749f80a0818eb09d3657e5d1c9038c031d9e30e.tar.gz
tcl-1749f80a0818eb09d3657e5d1c9038c031d9e30e.tar.bz2
Add TCL_NORETURN attribute to TclpThreadExit() and Tcl_ExitThread()
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tclDecls.h4
-rw-r--r--generic/tclInt.h2
-rw-r--r--macosx/tclMacOSXNotify.c5
-rw-r--r--unix/tclUnixNotfy.c4
5 files changed, 8 insertions, 9 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index ba047a0..b2b91a9 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -1059,7 +1059,7 @@ declare 293 {
int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags)
}
declare 294 {
- void Tcl_ExitThread(int status)
+ TCL_NORETURN void Tcl_ExitThread(int status)
}
declare 295 {
int Tcl_ExternalToUtf(Tcl_Interp *interp, Tcl_Encoding encoding,
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index d990889..d543238 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -878,7 +878,7 @@ EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, int objc,
EXTERN int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
int flags);
/* 294 */
-EXTERN void Tcl_ExitThread(int status);
+EXTERN TCL_NORETURN void Tcl_ExitThread(int status);
/* 295 */
EXTERN int Tcl_ExternalToUtf(Tcl_Interp *interp,
Tcl_Encoding encoding, const char *src,
@@ -2151,7 +2151,7 @@ typedef struct TclStubs {
int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */
int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */
int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */
- void (*tcl_ExitThread) (int status); /* 294 */
+ TCL_NORETURN1 void (*tcl_ExitThread) (int status); /* 294 */
int (*tcl_ExternalToUtf) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 295 */
char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr); /* 296 */
void (*tcl_FinalizeThread) (void); /* 297 */
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 3845598..1fbc541 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3124,7 +3124,7 @@ MODULE_SCOPE void TclpSetVariables(Tcl_Interp *interp);
MODULE_SCOPE void * TclThreadStorageKeyGet(Tcl_ThreadDataKey *keyPtr);
MODULE_SCOPE void TclThreadStorageKeySet(Tcl_ThreadDataKey *keyPtr,
void *data);
-MODULE_SCOPE void TclpThreadExit(int status);
+MODULE_SCOPE TCL_NORETURN void TclpThreadExit(int status);
MODULE_SCOPE void TclRememberCondition(Tcl_Condition *mutex);
MODULE_SCOPE void TclRememberJoinableThread(Tcl_ThreadId id);
MODULE_SCOPE void TclRememberMutex(Tcl_Mutex *mutex);
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index a7f26b7..1af73de 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -385,8 +385,7 @@ static CFStringRef tclEventsOnlyRunLoopMode = NULL;
*/
static void StartNotifierThread(void);
-static void NotifierThreadProc(ClientData clientData)
- __attribute__ ((__noreturn__));
+static TCL_NORETURN void NotifierThreadProc(ClientData clientData);
static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
static void TimerWakeUp(CFRunLoopTimerRef timer, void *info);
static void QueueFileEvents(void *info);
@@ -1753,7 +1752,7 @@ TclUnixWaitForFile(
*----------------------------------------------------------------------
*/
-static void
+static TCL_NORETURN void
NotifierThreadProc(
ClientData clientData) /* Not used. */
{
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index e37962d..6b7669d 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -193,7 +193,7 @@ static Tcl_ThreadId notifierThread;
*/
#ifdef TCL_THREADS
-static void NotifierThreadProc(ClientData clientData);
+static TCL_NORETURN void NotifierThreadProc(ClientData clientData);
#if defined(HAVE_PTHREAD_ATFORK)
static int atForkInit = 0;
static void AtForkChild(void);
@@ -1139,7 +1139,7 @@ Tcl_WaitForEvent(
*----------------------------------------------------------------------
*/
-static void
+static TCL_NORETURN void
NotifierThreadProc(
ClientData clientData) /* Not used. */
{