Tcl Source Code

Check-in [52c42b36eb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Free the WinThread structure before running the original thread procedure.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3567063
Files: files | file ages | folders
SHA1: 52c42b36eb26be90c053de9a9c810d7f0f447a08
User & Date: mistachkin 2012-09-13 18:37:55
Context
2012-09-13
20:03
Make compilation of the fp control changes possible with MinGW. check-in: 0bc6042f01 user: mistachkin tags: bug-3567063
18:37
Free the WinThread structure before running the original thread procedure. check-in: 52c42b36eb user: mistachkin tags: bug-3567063
18:30
Initial work on SF FRQ #3567063. check-in: e5555c6455 user: mistachkin tags: bug-3567063
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWinThrd.c.

157
158
159
160
161
162
163


164
165
166
167
168
169

170




171
172
173
174
175
176
177
static DWORD WINAPI
TclWinThreadStart(
    LPVOID lpParameter)		/* The WinThread structure pointer passed
				 * from TclpThreadCreate */
{
    WinThread *winThreadPtr = (WinThread *) lpParameter;
    unsigned int fpmask = _MCW_EM | _MCW_RC | _MCW_PC | _MCW_DN;



    if (!winThreadPtr) {
	return TCL_ERROR;
    }

    _controlfp(winThreadPtr->fpControl, fpmask);

    return winThreadPtr->lpStartAddress(winThreadPtr->lpParameter);




}

/*
 *----------------------------------------------------------------------
 *
 * TclpThreadCreate --
 *







>
>






>
|
>
>
>
>







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
static DWORD WINAPI
TclWinThreadStart(
    LPVOID lpParameter)		/* The WinThread structure pointer passed
				 * from TclpThreadCreate */
{
    WinThread *winThreadPtr = (WinThread *) lpParameter;
    unsigned int fpmask = _MCW_EM | _MCW_RC | _MCW_PC | _MCW_DN;
    LPTHREAD_START_ROUTINE lpOrigStartAddress;
    LPVOID lpOrigParameter;

    if (!winThreadPtr) {
	return TCL_ERROR;
    }

    _controlfp(winThreadPtr->fpControl, fpmask);

    lpOrigStartAddress = winThreadPtr->lpStartAddress;
    lpOrigParameter = winThreadPtr->lpParameter;

    ckfree((char *)winThreadPtr);
    return lpOrigStartAddress(lpOrigParameter);
}

/*
 *----------------------------------------------------------------------
 *
 * TclpThreadCreate --
 *