1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*
* tclWinThread.c --
*
* This file implements the Windows-specific thread operations.
*
* Copyright (c) 1998 by Sun Microsystems, Inc.
* Copyright (c) 1999 by Scriptics Corporation
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tclWinThrd.c 1.13 98/02/18 14:00:23
*/
#include "tclWinInt.h"
#include <dos.h>
#include <fcntl.h>
#include <io.h>
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*
* tclWinThread.c --
*
* This file implements the Windows-specific thread operations.
*
* Copyright (c) 1998 by Sun Microsystems, Inc.
* Copyright (c) 1999 by Scriptics Corporation
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclWinThrd.c,v 1.7 2000/04/17 20:32:26 welch Exp $
*/
#include "tclWinInt.h"
#include <dos.h>
#include <fcntl.h>
#include <io.h>
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
ClientData clientData; /* The one argument to Main() */
int stackSize; /* Size of stack for the new thread */
int flags; /* Flags controlling behaviour of
* the new thread */
{
unsigned long code;
code = _beginthreadex(NULL, stackSize, (LPTHREAD_START_ROUTINE) proc,
(void *)clientData, 0, (unsigned *)idPtr);
if (code == 0) {
return TCL_ERROR;
} else {
return TCL_OK;
}
}
|
|
|
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
ClientData clientData; /* The one argument to Main() */
int stackSize; /* Size of stack for the new thread */
int flags; /* Flags controlling behaviour of
* the new thread */
{
unsigned long code;
code = _beginthreadex(NULL, stackSize, proc, clientData, 0,
(unsigned *)idPtr);
if (code == 0) {
return TCL_ERROR;
} else {
return TCL_OK;
}
}
|