fix [-Wincompatible-pointer-types] in RunThreadsOn()

This commit is contained in:
Garux 2020-01-24 02:47:33 +03:00
parent c7010884b6
commit be007466f9

View File

@ -169,7 +169,6 @@ void ThreadUnlock( void ){
============= =============
*/ */
void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
int threadid[MAX_THREADS];
HANDLE threadhandle[MAX_THREADS]; HANDLE threadhandle[MAX_THREADS];
int i; int i;
int start, end; int start, end;
@ -194,16 +193,16 @@ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
for ( i = 0 ; i < numthreads ; i++ ) for ( i = 0 ; i < numthreads ; i++ )
{ {
threadhandle[i] = CreateThread( threadhandle[i] = CreateThread(
NULL, // LPSECURITY_ATTRIBUTES lpsa, NULL, // LPSECURITY_ATTRIBUTES lpThreadAttributes,
//0, // DWORD cbStack, //0, // SIZE_T dwStackSize,
/* ydnar: cranking stack size to eliminate radiosity crash with 1MB stack on win32 */ /* ydnar: cranking stack size to eliminate radiosity crash with 1MB stack on win32 */
( 4096 * 1024 ), ( 4096 * 1024 ),
(LPTHREAD_START_ROUTINE)func, // LPTHREAD_START_ROUTINE lpStartAddr, (LPTHREAD_START_ROUTINE)func, // LPTHREAD_START_ROUTINE lpStartAddress,
(LPVOID)i, // LPVOID lpvThreadParm, (LPVOID)i, // LPVOID lpParameter,
0, // DWORD fdwCreate, 0, // DWORD dwCreationFlags,
&threadid[i] ); NULL ); // LPDWORD lpThreadId
} }
for ( i = 0 ; i < numthreads ; i++ ) for ( i = 0 ; i < numthreads ; i++ )