Fix CreateThreadPool

This commit is contained in:
exstrim401 2022-11-20 19:32:30 +02:00
parent 17c0664d45
commit 0dc822149b
9 changed files with 12 additions and 9 deletions

View file

@ -3286,7 +3286,7 @@ void CSaveRestore::Init( void )
threadPoolStartParams.bUseAffinityTable = true; threadPoolStartParams.bUseAffinityTable = true;
} }
g_pSaveThread = CreateThreadPool1(); g_pSaveThread = CreateThreadPool();
g_pSaveThread->Start( threadPoolStartParams, "SaveJob" ); g_pSaveThread->Start( threadPoolStartParams, "SaveJob" );
} }

View file

@ -364,7 +364,7 @@ def build(bld):
elif bld.env.DEST_OS == 'win32': elif bld.env.DEST_OS == 'win32':
libs += ['USER32', 'WINMM', 'WININET', 'DSOUND', 'DXGUID', 'GDI32', 'bzip2'] libs += ['USER32', 'WINMM', 'WININET', 'DSOUND', 'DXGUID', 'GDI32', 'bzip2']
elif bld.env.DEST_OS == 'darwin': elif bld.env.DEST_OS == 'darwin':
libs += ['COREAUDIO', 'AUDIOTOOLBOX', 'SYSTEMCONFIGURATION'] libs += ['APPKIT', 'COREAUDIO', 'AUDIOTOOLBOX', 'SYSTEMCONFIGURATION']
install_path = bld.env.LIBDIR install_path = bld.env.LIBDIR

View file

@ -663,7 +663,7 @@ void CBaseFileSystem::InitAsync()
if ( VCRGetMode() == VCR_Disabled ) if ( VCRGetMode() == VCR_Disabled )
{ {
// create the i/o thread pool // create the i/o thread pool
m_pThreadPool = CreateThreadPool1(); m_pThreadPool = CreateThreadPool();
ThreadPoolStartParams_t params; ThreadPoolStartParams_t params;
params.iThreadPriority = 0; params.iThreadPriority = 0;

View file

@ -1087,7 +1087,7 @@ bool CParticleMgr::Init(unsigned long count, IMaterialSystem *pMaterials)
if ( IsX360() ) if ( IsX360() )
{ {
//m_pThreadPool[0] = CreateThreadPool(); //m_pThreadPool[0] = CreateThreadPool();
m_pThreadPool[1] = CreateThreadPool1(); m_pThreadPool[1] = CreateThreadPool();
ThreadPoolStartParams_t startParams; ThreadPoolStartParams_t startParams;
startParams.nThreads = 3; startParams.nThreads = 3;

View file

@ -3567,7 +3567,7 @@ IThreadPool *CMaterialSystem::CreateMatQueueThreadPool()
// that only the threadpool threads should execute these jobs. // that only the threadpool threads should execute these jobs.
startParams.bExecOnThreadPoolThreadsOnly = true; startParams.bExecOnThreadPoolThreadsOnly = true;
m_pMatQueueThreadPool = CreateThreadPool1(); m_pMatQueueThreadPool = CreateThreadPool();
m_pMatQueueThreadPool->Start( startParams, "MatQueue" ); m_pMatQueueThreadPool->Start( startParams, "MatQueue" );
} }

View file

@ -419,7 +419,7 @@ public:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
JOB_INTERFACE IThreadPool *CreateThreadPool1(); JOB_INTERFACE IThreadPool *CreateThreadPool();
JOB_INTERFACE void DestroyThreadPool( IThreadPool *pPool ); JOB_INTERFACE void DestroyThreadPool( IThreadPool *pPool );
//------------------------------------- //-------------------------------------

View file

@ -75,7 +75,7 @@ bool CSharedReplayContext::InitThreadPool()
{ {
// Create thread pool // Create thread pool
Log( "Replay: Creating thread pool..." ); Log( "Replay: Creating thread pool..." );
IThreadPool *pThreadPool = CreateThreadPool1(); IThreadPool *pThreadPool = CreateThreadPool();
if ( !pThreadPool ) if ( !pThreadPool )
{ {
Log( "failed!\n" ); Log( "failed!\n" );

View file

@ -285,7 +285,7 @@ private:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
JOB_INTERFACE IThreadPool *CreateThreadPool1() JOB_INTERFACE IThreadPool *CreateThreadPool()
{ {
return new CThreadPool; return new CThreadPool;
} }

View file

@ -48,11 +48,13 @@ def build(bld):
defines = [] defines = []
libs = ['tier0','tier1'] libs = ['tier0','tier1']
linkflags = []
if bld.env.DEST_OS == 'android': if bld.env.DEST_OS == 'android':
libs += ['ANDROID_SUPPORT'] libs += ['ANDROID_SUPPORT']
elif bld.env.DEST_OS == 'darwin': elif bld.env.DEST_OS == 'darwin':
libs += ['ICONV', 'COREFOUNDATION', 'CORESERVICES'] libs += ['ICONV', 'COREFOUNDATION']
linkflags += ['-framework', 'CoreServices']
install_path = bld.env.LIBDIR install_path = bld.env.LIBDIR
@ -64,6 +66,7 @@ def build(bld):
includes = includes, includes = includes,
defines = defines, defines = defines,
use = libs, use = libs,
linkflags = linkflags,
install_path = install_path, install_path = install_path,
subsystem = bld.env.MSVC_SUBSYSTEM, subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count() idx = bld.get_taskgen_count()