Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | * generic/tclThreadTest.c (ThreadExitProc): Fixed bug where static memory was being returned instead of a dynamically allocated result in error cases. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | core-8-1-branch-old |
Files: | files | file ages | folders |
SHA1: |
580aaa126e73018cad2cc8a6e94fc7fd |
User & Date: | stanton 1999-04-03 01:19:48.000 |
Context
1999-04-03
| ||
01:19 | * tests/http.test: Fixed bad test initialization code. check-in: 959b030de5 user: stanton tags: core-8-1-branch-old | |
01:19 | * generic/tclThreadTest.c (ThreadExitProc): Fixed bug where static memory was being returned instead... check-in: 580aaa126e user: stanton tags: core-8-1-branch-old | |
00:44 | Fix DDE code for Win95/98 check-in: ca77050cc6 user: redman tags: core-8-1-branch-old | |
Changes
Changes to generic/tclThreadTest.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* * tclThreadTest.c -- * * This file implements the testthread command. Eventually this * should be tclThreadCmd.c * Some of this code is based on work done by Richard Hipp on behalf of * Conservation Through Innovation, Limited, with their permission. * * Copyright (c) 1998 by Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* * tclThreadTest.c -- * * This file implements the testthread command. Eventually this * should be tclThreadCmd.c * Some of this code is based on work done by Richard Hipp on behalf of * Conservation Through Innovation, Limited, with their permission. * * Copyright (c) 1998 by Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclThreadTest.c,v 1.1.2.7 1999/04/03 01:19:48 stanton Exp $ */ #include "tclInt.h" #ifdef TCL_THREADS /* * Each thread has an single instance of the following structure. There |
︙ | ︙ | |||
871 872 873 874 875 876 877 878 | } resultPtr->nextPtr = resultPtr->prevPtr = 0; resultPtr->eventPtr->resultPtr = NULL; ckfree((char *)resultPtr); } else if (resultPtr->dstThreadId == self) { /* * Dang. The target is going away. Unblock the caller. */ | > > > | > > | 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | } resultPtr->nextPtr = resultPtr->prevPtr = 0; resultPtr->eventPtr->resultPtr = NULL; ckfree((char *)resultPtr); } else if (resultPtr->dstThreadId == self) { /* * Dang. The target is going away. Unblock the caller. * The result string must be dynamically allocated because * the main thread is going to call free on it. */ char *msg = "target thread died"; resultPtr->result = ckalloc(strlen(msg)+1); strcpy(resultPtr->result, msg); resultPtr->code = TCL_ERROR; Tcl_ConditionNotify(&resultPtr->done); } } Tcl_MutexUnlock(&threadMutex); } #endif /* TCL_THREADS */ |