Fix CreateThreadPool

This commit is contained in:
exstrim401 2022-11-20 19:32:30 +02:00
parent 54d76a1131
commit d8580d59d2
9 changed files with 12 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -3567,7 +3567,7 @@ IThreadPool *CMaterialSystem::CreateMatQueueThreadPool()
// that only the threadpool threads should execute these jobs.
startParams.bExecOnThreadPoolThreadsOnly = true;
m_pMatQueueThreadPool = CreateThreadPool1();
m_pMatQueueThreadPool = CreateThreadPool();
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 );
//-------------------------------------

View File

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

View File

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

View File

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