Common: Remove references to pthreads4w

It's only needed for wx now.
This commit is contained in:
Connor McLaughlin 2022-05-09 20:34:26 +10:00 committed by refractionpcsx2
parent e5716922a3
commit f8dcff9fc4
8 changed files with 18 additions and 32 deletions

View File

@ -26,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_base", "3rdparty\wxwid
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\projects\vstudio\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\projects\vstudio\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads4w", "3rdparty\pthreads4w\build\pthreads4w.vcxproj", "{0FAE817D-9A32-4830-857E-81DA57246E16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baseclasses", "3rdparty\baseclasses\baseclasses.vcxproj", "{27F17499-A372-4408-8AFA-4F9F4584FBD3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baseclasses", "3rdparty\baseclasses\baseclasses.vcxproj", "{27F17499-A372-4408-8AFA-4F9F4584FBD3}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
@ -170,18 +168,6 @@ Global
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release AVX2|x64.Build.0 = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release AVX2|x64.Build.0 = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.ActiveCfg = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.Build.0 = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.ActiveCfg = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.Build.0 = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.ActiveCfg = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.Build.0 = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.ActiveCfg = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.Build.0 = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.ActiveCfg = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.Build.0 = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.ActiveCfg = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.Build.0 = Release|x64
{27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.ActiveCfg = Debug|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.ActiveCfg = Debug|x64
{27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.Build.0 = Debug|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.Build.0 = Debug|x64
{27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug|x64.ActiveCfg = Debug|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug|x64.ActiveCfg = Debug|x64
@ -410,7 +396,6 @@ Global
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{0FAE817D-9A32-4830-857E-81DA57246E16} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{27F17499-A372-4408-8AFA-4F9F4584FBD3} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {27F17499-A372-4408-8AFA-4F9F4584FBD3} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{12728250-16EC-4DC6-94D7-E21DD88947F8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {12728250-16EC-4DC6-94D7-E21DD88947F8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{449AD25E-424A-4714-BABC-68706CDCC33B} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {449AD25E-424A-4714-BABC-68706CDCC33B} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}

View File

@ -170,7 +170,7 @@ endif()
if(WIN32) if(WIN32)
enable_language(ASM_MASM) enable_language(ASM_MASM)
target_sources(common PRIVATE FastJmp.asm) target_sources(common PRIVATE FastJmp.asm)
target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc pthreads4w Winmm.lib) target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc Winmm.lib)
target_sources(common PRIVATE target_sources(common PRIVATE
CrashHandler.cpp CrashHandler.cpp
CrashHandler.h CrashHandler.h

View File

@ -21,7 +21,6 @@
<ImportGroup Label="PropertySheets"> <ImportGroup Label="PropertySheets">
<Import Project="vsprops\CommonLibrary.props" /> <Import Project="vsprops\CommonLibrary.props" />
<Import Project="vsprops\3rdpartyDeps.props" /> <Import Project="vsprops\3rdpartyDeps.props" />
<Import Project="vsprops\pthreads.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="vsprops\CodeGen_Debug.props" /> <Import Condition="$(Configuration.Contains(Debug))" Project="vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="vsprops\CodeGen_Devel.props" /> <Import Condition="$(Configuration.Contains(Devel))" Project="vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="vsprops\CodeGen_Release.props" /> <Import Condition="$(Configuration.Contains(Release))" Project="vsprops\CodeGen_Release.props" />
@ -211,9 +210,6 @@
<ProjectReference Include="..\3rdparty\glslang\glslang.vcxproj"> <ProjectReference Include="..\3rdparty\glslang\glslang.vcxproj">
<Project>{ef6834a9-11f3-4331-bc34-21b325abb180}</Project> <Project>{ef6834a9-11f3-4331-bc34-21b325abb180}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\3rdparty\pthreads4w\build\pthreads4w.vcxproj">
<Project>{0fae817d-9a32-4830-857e-81da57246e16}</Project>
</ProjectReference>
<ProjectReference Include="..\3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj"> <ProjectReference Include="..\3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj">
<Project>{3fcc50c2-81e9-5db2-b8d8-2129427568b1}</Project> <Project>{3fcc50c2-81e9-5db2-b8d8-2129427568b1}</Project>
</ProjectReference> </ProjectReference>

View File

@ -21,7 +21,6 @@
<Import Project="$(SolutionDir)common\vsprops\common.props" /> <Import Project="$(SolutionDir)common\vsprops\common.props" />
<Import Project="$(SolutionDir)common\vsprops\BaseProperties.props" /> <Import Project="$(SolutionDir)common\vsprops\BaseProperties.props" />
<Import Project="$(SolutionDir)common\vsprops\3rdpartyDeps.props" /> <Import Project="$(SolutionDir)common\vsprops\3rdpartyDeps.props" />
<Import Project="$(SolutionDir)common\vsprops\pthreads.props" />
<Import Project="$(SolutionDir)common\vsprops\QtCompile.props" /> <Import Project="$(SolutionDir)common\vsprops\QtCompile.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="$(SolutionDir)common\vsprops\CodeGen_Debug.props" /> <Import Condition="$(Configuration.Contains(Debug))" Project="$(SolutionDir)common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="$(SolutionDir)common\vsprops\CodeGen_Devel.props" /> <Import Condition="$(Configuration.Contains(Devel))" Project="$(SolutionDir)common\vsprops\CodeGen_Devel.props" />
@ -107,10 +106,6 @@
<ProjectReference Include="$(SolutionDir)3rdparty\libsamplerate\libsamplerate.vcxproj"> <ProjectReference Include="$(SolutionDir)3rdparty\libsamplerate\libsamplerate.vcxproj">
<Project>{47afdbef-f15f-4bc0-b436-5be443c3f80f}</Project> <Project>{47afdbef-f15f-4bc0-b436-5be443c3f80f}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\pthreads4w\build\pthreads4w.vcxproj">
<Project>{0fae817d-9a32-4830-857e-81da57246e16}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\soundtouch\SoundTouch.vcxproj"> <ProjectReference Include="$(SolutionDir)3rdparty\soundtouch\SoundTouch.vcxproj">
<Project>{e9b51944-7e6d-4bcd-83f2-7bbd5a46182d}</Project> <Project>{e9b51944-7e6d-4bcd-83f2-7bbd5a46182d}</Project>
</ProjectReference> </ProjectReference>

View File

@ -1616,7 +1616,6 @@ endif()
if(WIN32) if(WIN32)
target_link_libraries(PCSX2_FLAGS INTERFACE target_link_libraries(PCSX2_FLAGS INTERFACE
baseclasses baseclasses
pthreads4w
WIL::WIL WIL::WIL
D3D12MemAlloc D3D12MemAlloc
setupapi.lib setupapi.lib
@ -1635,6 +1634,11 @@ if(WIN32)
opengl32.lib opengl32.lib
comsuppw.lib comsuppw.lib
) )
if(NOT PCSX2_CORE)
target_link_libraries(PCSX2_FLAGS INTERFACE
pthreads4w
)
endif()
elseif(APPLE) elseif(APPLE)
target_link_libraries(PCSX2_FLAGS INTERFACE target_link_libraries(PCSX2_FLAGS INTERFACE
PCAP::PCAP PCAP::PCAP

View File

@ -53,7 +53,11 @@
#include <stddef.h> #include <stddef.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifndef PCSX2_CORE
// pthreadsw32 is not needed when compiling PCSX2-Qt.
#include <pthread.h> #include <pthread.h>
#endif
#undef TRUE #undef TRUE

View File

@ -21,7 +21,6 @@
<Import Project="$(SolutionDir)common\vsprops\common.props" /> <Import Project="$(SolutionDir)common\vsprops\common.props" />
<Import Project="$(SolutionDir)common\vsprops\BaseProperties.props" /> <Import Project="$(SolutionDir)common\vsprops\BaseProperties.props" />
<Import Project="$(SolutionDir)common\vsprops\3rdpartyDeps.props" /> <Import Project="$(SolutionDir)common\vsprops\3rdpartyDeps.props" />
<Import Project="$(SolutionDir)common\vsprops\pthreads.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="$(SolutionDir)common\vsprops\CodeGen_Debug.props" /> <Import Condition="$(Configuration.Contains(Debug))" Project="$(SolutionDir)common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="$(SolutionDir)common\vsprops\CodeGen_Devel.props" /> <Import Condition="$(Configuration.Contains(Devel))" Project="$(SolutionDir)common\vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="$(SolutionDir)common\vsprops\CodeGen_Release.props" /> <Import Condition="$(Configuration.Contains(Release))" Project="$(SolutionDir)common\vsprops\CodeGen_Release.props" />
@ -756,10 +755,6 @@
<ProjectReference Include="$(SolutionDir)3rdparty\libsamplerate\libsamplerate.vcxproj"> <ProjectReference Include="$(SolutionDir)3rdparty\libsamplerate\libsamplerate.vcxproj">
<Project>{47afdbef-f15f-4bc0-b436-5be443c3f80f}</Project> <Project>{47afdbef-f15f-4bc0-b436-5be443c3f80f}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\pthreads4w\build\pthreads4w.vcxproj">
<Project>{0fae817d-9a32-4830-857e-81da57246e16}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\soundtouch\SoundTouch.vcxproj"> <ProjectReference Include="$(SolutionDir)3rdparty\soundtouch\SoundTouch.vcxproj">
<Project>{e9b51944-7e6d-4bcd-83f2-7bbd5a46182d}</Project> <Project>{e9b51944-7e6d-4bcd-83f2-7bbd5a46182d}</Project>
</ProjectReference> </ProjectReference>

View File

@ -31,6 +31,7 @@
#ifndef PCSX2_CORE #ifndef PCSX2_CORE
#include "gui/SysThreads.h" #include "gui/SysThreads.h"
#include <pthread.h>
#else #else
#include "VMManager.h" #include "VMManager.h"
#endif #endif
@ -733,13 +734,15 @@ static void recExecute()
if (eeRecNeedsReset.load()) if (eeRecNeedsReset.load())
recResetRaw(); recResetRaw();
int oldstate;
m_cpuException = nullptr; m_cpuException = nullptr;
m_Exception = nullptr; m_Exception = nullptr;
// setjmp will save the register context and will return 0 // setjmp will save the register context and will return 0
// A call to longjmp will restore the context (included the eip/rip) // A call to longjmp will restore the context (included the eip/rip)
// but will return the longjmp 2nd parameter (here 1) // but will return the longjmp 2nd parameter (here 1)
#ifndef PCSX2_CORE
int oldstate;
#endif
if (!fastjmp_set(&m_SetJmp_StateCheck)) if (!fastjmp_set(&m_SetJmp_StateCheck))
{ {
eeCpuExecuting = true; eeCpuExecuting = true;
@ -749,14 +752,18 @@ static void recExecute()
// in Linux, which cannot have a C++ exception cross the recompiler. Hence the changing // in Linux, which cannot have a C++ exception cross the recompiler. Hence the changing
// of the cancelstate here! // of the cancelstate here!
#ifndef PCSX2_CORE
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate); pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
#endif
EnterRecompiledCode(); EnterRecompiledCode();
// Generally unreachable code here ... // Generally unreachable code here ...
} }
else else
{ {
#ifndef PCSX2_CORE
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
#endif
} }
eeCpuExecuting = false; eeCpuExecuting = false;