diff options
author | Lukas Rusak <lorusak@gmail.com> | 2022-01-22 11:11:02 -0800 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2022-03-05 22:36:29 -0800 |
commit | 951d98aff0bd4ab9ebac0e1d63d8e6b594c6b895 (patch) | |
tree | b8c8af7906c0077a3814486984b23f3edaa53649 | |
parent | 6086e8bcc1b9736d5eae51bf8fadba91fe5e1d06 (diff) |
IThreadImpl: move platform code to platform dir
20 files changed, 27 insertions, 21 deletions
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt index 0c4cf88360..506b9a5607 100644 --- a/cmake/treedata/android/subdirs.txt +++ b/cmake/treedata/android/subdirs.txt @@ -17,5 +17,6 @@ xbmc/platform/android/utils platform/android/utils xbmc/platform/linux/peripherals platform/linux/peripherals xbmc/platform/posix platform/posix xbmc/platform/posix/filesystem platform/posix/filesystem +xbmc/platform/posix/threads platform/posix/threads xbmc/platform/posix/utils platform/posix/utils xbmc/windowing/android windowing/android diff --git a/cmake/treedata/darwin_embedded/subdirs.txt b/cmake/treedata/darwin_embedded/subdirs.txt index 20bfa02a70..169fb3727d 100644 --- a/cmake/treedata/darwin_embedded/subdirs.txt +++ b/cmake/treedata/darwin_embedded/subdirs.txt @@ -11,4 +11,5 @@ xbmc/platform/darwin/network platform/darwin/network xbmc/platform/darwin/utils platform/darwin/utils xbmc/platform/posix posix xbmc/platform/posix/filesystem platform/posix/filesystem +xbmc/platform/posix/threads platform/posix/threads xbmc/platform/posix/utils platform/posix/utils diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt index a7433a5a62..ea5b3fac64 100644 --- a/cmake/treedata/freebsd/subdirs.txt +++ b/cmake/treedata/freebsd/subdirs.txt @@ -10,5 +10,6 @@ xbmc/platform/linux/storage platform/linux/storage xbmc/platform/posix platform/posix xbmc/platform/posix/filesystem platform/posix/filesystem xbmc/platform/posix/network platform/posix/network +xbmc/platform/posix/threads platform/posix/threads xbmc/platform/posix/utils platform/posix/utils xbmc/windowing/linux windowing/linux diff --git a/cmake/treedata/linux/subdirs.txt b/cmake/treedata/linux/subdirs.txt index 35c8d88c15..2325768962 100644 --- a/cmake/treedata/linux/subdirs.txt +++ b/cmake/treedata/linux/subdirs.txt @@ -10,5 +10,6 @@ xbmc/platform/linux/storage platform/linux/storage xbmc/platform/posix platform/posix xbmc/platform/posix/filesystem platform/posix/filesystem xbmc/platform/posix/network platform/posix/network +xbmc/platform/posix/threads platform/posix/threads xbmc/platform/posix/utils platform/posix/utils xbmc/windowing/linux windowing/linux diff --git a/cmake/treedata/osx/subdirs.txt b/cmake/treedata/osx/subdirs.txt index a13635d390..92a948b81f 100644 --- a/cmake/treedata/osx/subdirs.txt +++ b/cmake/treedata/osx/subdirs.txt @@ -12,6 +12,7 @@ xbmc/platform/darwin/utils platform/darwin/utils xbmc/platform/posix posix xbmc/platform/posix/filesystem platform/posix/filesystem xbmc/platform/posix/network platform/posix/network +xbmc/platform/posix/threads platform/posix/threads xbmc/platform/posix/utils platform/posix/utils xbmc/windowing/osx windowing/osx xbmc/windowing/osx/SDL windowing/osx/SDL diff --git a/cmake/treedata/windows/subdirs.txt b/cmake/treedata/windows/subdirs.txt index c63397758a..2f465b7f63 100644 --- a/cmake/treedata/windows/subdirs.txt +++ b/cmake/treedata/windows/subdirs.txt @@ -12,7 +12,7 @@ xbmc/platform/win32/network platform/win32/network xbmc/platform/win32/peripherals platform/win32/peripherals xbmc/platform/win32/powermanagement platform/win32/powermanagement xbmc/platform/win32/storage platform/win32/storage +xbmc/platform/win32/threads platform/win32/threads xbmc/platform/win32/utils platform/win32/utils xbmc/rendering/dx rendering/dx -xbmc/threads/platform/win threads/win xbmc/windowing/windows windowing/windows diff --git a/cmake/treedata/windowsstore/subdirs.txt b/cmake/treedata/windowsstore/subdirs.txt index 792d1050da..f75f7c7406 100644 --- a/cmake/treedata/windowsstore/subdirs.txt +++ b/cmake/treedata/windowsstore/subdirs.txt @@ -9,8 +9,8 @@ xbmc/platform/win10/network platform/win10/network xbmc/platform/win10/peripherals platform/win10/peripherals xbmc/platform/win10/powermanagement platform/win10/powermanagement xbmc/platform/win10/storage platform/win10/storage +xbmc/platform/win10/threads platform/win10/threads xbmc/platform/win32/filesystem platform/win32/filesystem xbmc/platform/win32/utils platform/win32/utils xbmc/rendering/dx rendering/dx -xbmc/threads/platform/win threads/win xbmc/windowing/win10 windowing/win10 diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index af4ad81b84..e68c0528f1 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -111,7 +111,7 @@ #include "PartyModeManager.h" #include "network/ZeroconfBrowser.h" #ifndef TARGET_POSIX -#include "threads/platform/win/Win32Exception.h" +#include "platform/win32/threads/Win32Exception.h" #endif #include "interfaces/json-rpc/JSONRPC.h" #include "interfaces/AnnouncementManager.h" diff --git a/xbmc/platform/posix/threads/CMakeLists.txt b/xbmc/platform/posix/threads/CMakeLists.txt new file mode 100644 index 0000000000..8afaf562c3 --- /dev/null +++ b/xbmc/platform/posix/threads/CMakeLists.txt @@ -0,0 +1,4 @@ +set(SOURCES ThreadImplPosix.cpp) +set(HEADERS ThreadImplPosix.h) + +core_add_library(platform_posix_threads) diff --git a/xbmc/threads/platform/pthreads/ThreadImpl.cpp b/xbmc/platform/posix/threads/ThreadImplPosix.cpp index c79d660529..e897923f08 100644 --- a/xbmc/threads/platform/pthreads/ThreadImpl.cpp +++ b/xbmc/platform/posix/threads/ThreadImplPosix.cpp @@ -6,7 +6,7 @@ * See LICENSES/README.md for more information. */ -#include "ThreadImpl.h" +#include "ThreadImplPosix.h" #include <limits.h> #include <mutex> diff --git a/xbmc/threads/platform/pthreads/ThreadImpl.h b/xbmc/platform/posix/threads/ThreadImplPosix.h index 6e2a98de42..6e2a98de42 100644 --- a/xbmc/threads/platform/pthreads/ThreadImpl.h +++ b/xbmc/platform/posix/threads/ThreadImplPosix.h diff --git a/xbmc/platform/win10/threads/CMakeLists.txt b/xbmc/platform/win10/threads/CMakeLists.txt new file mode 100644 index 0000000000..c6a245cfaa --- /dev/null +++ b/xbmc/platform/win10/threads/CMakeLists.txt @@ -0,0 +1,4 @@ +set(SOURCES ${PROJECT_SOURCE_DIR}/xbmc/platform/win32/threads/ThreadImplWin.cpp) +set(HEADERS ${PROJECT_SOURCE_DIR}/xbmc/platform/win32/threads/ThreadImplWin.h) + +core_add_library(threads_win10) diff --git a/xbmc/platform/win32/WinMain.cpp b/xbmc/platform/win32/WinMain.cpp index 51fecd30f1..52b91d955a 100644 --- a/xbmc/platform/win32/WinMain.cpp +++ b/xbmc/platform/win32/WinMain.cpp @@ -12,10 +12,10 @@ #include "platform/Environment.h" #include "platform/xbmc.h" #include "threads/Thread.h" -#include "threads/platform/win/Win32Exception.h" #include "utils/CharsetConverter.h" // Required to initialize converters before usage #include "platform/win32/CharsetConverter.h" +#include "platform/win32/threads/Win32Exception.h" #include <Objbase.h> #include <WinSock2.h> diff --git a/xbmc/platform/win32/threads/CMakeLists.txt b/xbmc/platform/win32/threads/CMakeLists.txt new file mode 100644 index 0000000000..87d98161a4 --- /dev/null +++ b/xbmc/platform/win32/threads/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES ThreadImplWin.cpp + Win32Exception.cpp) + +set(HEADERS ThreadImplWin.h + Win32Exception.h) + +core_add_library(threads_win) diff --git a/xbmc/threads/platform/win/ThreadImpl.cpp b/xbmc/platform/win32/threads/ThreadImplWin.cpp index 3cf3191df4..01f86a7999 100644 --- a/xbmc/threads/platform/win/ThreadImpl.cpp +++ b/xbmc/platform/win32/threads/ThreadImplWin.cpp @@ -6,7 +6,7 @@ * See LICENSES/README.md for more information. */ -#include "ThreadImpl.h" +#include "ThreadImplWin.h" #include "utils/log.h" diff --git a/xbmc/threads/platform/win/ThreadImpl.h b/xbmc/platform/win32/threads/ThreadImplWin.h index 73abd864e5..73abd864e5 100644 --- a/xbmc/threads/platform/win/ThreadImpl.h +++ b/xbmc/platform/win32/threads/ThreadImplWin.h diff --git a/xbmc/threads/platform/win/Win32Exception.cpp b/xbmc/platform/win32/threads/Win32Exception.cpp index 8590aeabe8..8590aeabe8 100644 --- a/xbmc/threads/platform/win/Win32Exception.cpp +++ b/xbmc/platform/win32/threads/Win32Exception.cpp diff --git a/xbmc/threads/platform/win/Win32Exception.h b/xbmc/platform/win32/threads/Win32Exception.h index b3419f0dc0..b3419f0dc0 100644 --- a/xbmc/threads/platform/win/Win32Exception.h +++ b/xbmc/platform/win32/threads/Win32Exception.h diff --git a/xbmc/threads/CMakeLists.txt b/xbmc/threads/CMakeLists.txt index 53076f463f..1aefb011d9 100644 --- a/xbmc/threads/CMakeLists.txt +++ b/xbmc/threads/CMakeLists.txt @@ -18,13 +18,7 @@ set(HEADERS Atomics.h IThreadImpl.h) if(NOT CORE_SYSTEM_NAME STREQUAL windows AND NOT CORE_SYSTEM_NAME STREQUAL windowsstore) - list(APPEND SOURCES platform/RecursiveMutex.cpp - platform/pthreads/ThreadImpl.cpp) - - list(APPEND HEADERS platform/pthreads/ThreadImpl.h) -else() - list(APPEND SOURCES platform/win/ThreadImpl.cpp) - list(APPEND HEADERS platform/win/ThreadImpl.h) + list(APPEND SOURCES platform/RecursiveMutex.cpp) endif() core_add_library(threads) diff --git a/xbmc/threads/platform/win/CMakeLists.txt b/xbmc/threads/platform/win/CMakeLists.txt deleted file mode 100644 index 384c2b0973..0000000000 --- a/xbmc/threads/platform/win/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(HEADERS ThreadImpl.h) -if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore) - set(SOURCES Win32Exception.cpp) - set(HEADERS ${HEADERS} Win32Exception.h) -endif() - - -core_add_library(threads_win) |