Browse Source

Fix CreateThreadPool

pull/142/head
exstrim401 2 years ago
parent
commit
d8580d59d2
  1. 2
      engine/host_saverestore.cpp
  2. 2
      engine/wscript
  3. 2
      filesystem/filesystem_async.cpp
  4. 2
      game/client/particlemgr.cpp
  5. 2
      materialsystem/cmaterialsystem.cpp
  6. 2
      public/vstdlib/jobthread.h
  7. 2
      replay/shared_replaycontext.cpp
  8. 2
      vstdlib/jobthread.cpp
  9. 5
      vstdlib/wscript

2
engine/host_saverestore.cpp

@ -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" );
} }

2
engine/wscript

@ -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

2
filesystem/filesystem_async.cpp

@ -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;

2
game/client/particlemgr.cpp

@ -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;

2
materialsystem/cmaterialsystem.cpp

@ -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" );
} }

2
public/vstdlib/jobthread.h

@ -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 );
//------------------------------------- //-------------------------------------

2
replay/shared_replaycontext.cpp

@ -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" );

2
vstdlib/jobthread.cpp

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

5
vstdlib/wscript

@ -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()

Loading…
Cancel
Save