/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+ Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef WIN32
+#include "globaldefs.h"
+#include <stdint.h>
+#if !GDEF_OS_WINDOWS
// The below define is necessary to use
// pthreads extensions like pthread_mutexattr_settype
#define _GNU_SOURCE
f = 40 * dispatch / workcount;
if ( f < oldf ) {
- Sys_Printf( "warning: progress went backwards (should never happen)\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: progress went backwards (should never happen)\n" );
oldf = f;
}
while ( f > oldf )
===================================================================
*/
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
#define USED
=======================================================================
*/
-#if defined( __linux__ ) || ( defined( __APPLE__ ) && !MAC_STATIC_HACK )
+#if GDEF_OS_LINUX || ( GDEF_OS_MACOS && !MAC_STATIC_HACK )
#define USED
#include <unistd.h>
for ( i = 0 ; i < numthreads ; i++ )
{
/* Default pthread attributes: joinable & non-realtime scheduling */
- if ( pthread_create( &work_threads[i], &attr, (void*)func, (void*)(size_t)i ) != 0 ) {
+ if ( pthread_create(&work_threads[i], &attr, (void *(*)(void *)) func, (void*)(uintptr_t)i ) != 0 ) {
Error( "pthread_create failed" );
}
}
=============
*/
void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
- int i;
int start, end;
dispatch = 0;