port(EterLib): Mutex/Thread/FileLoaderThread/GrpVertexBufferDynamic verbatim over Win32Crt kernel-object shims

Adds CreateSemaphore/ReleaseSemaphore/WaitForSingleObject/CloseHandle/
SetThreadPriority/_beginthreadex to Win32Crt; port.file_loader_thread covers
the shims, CThread and both the un-Created (40250 live) and Created loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 12:56:24 +09:00
co-authored by Claude Opus 5.5
parent e0cdcee2e6
commit 042bddf195
13 changed files with 758 additions and 75 deletions
+4
View File
@@ -607,3 +607,7 @@
{"date": "2026-09-30", "unit": "EterBase/FileBase.cpp", "action": "all units mapped (FILE* over Win32 HANDLE); stale fstream note corrected", "evidence": "port.utils CRC32/CFileBase/CMappedFile checks"}
{"date": "2026-09-30", "unit": "EterBase/MappedFile.cpp", "action": "Map/Unmap ADAPTED (mmap), rest PORTED verbatim; stale ifstream note corrected", "evidence": "port.utils CRC32/CFileBase/CMappedFile checks"}
{"date": "2026-09-30", "unit": "EterBase/Debug.cpp", "action": "Log*/Trace*/LogFile*/OpenLogFile PORTED (non-_DEBUG), OpenConsoleWindow N_A", "evidence": "port.debug_log"}
{"date": "2026-09-30", "unit": "EterLib/Mutex.cpp", "action": "all PORTED verbatim over the CRITICAL_SECTION shim", "evidence": "port.file_loader_thread"}
{"date": "2026-09-30", "unit": "EterLib/Thread.cpp", "action": "all PORTED verbatim over new Win32Crt _beginthreadex shim", "evidence": "port.file_loader_thread"}
{"date": "2026-09-30", "unit": "EterLib/FileLoaderThread.cpp", "action": "all PORTED verbatim over new Win32Crt semaphore/thread/WaitForSingleObject/CloseHandle shims", "evidence": "port.file_loader_thread"}
{"date": "2026-09-30", "unit": "EterLib/GrpVertexBufferDynamic.cpp", "action": "all PORTED verbatim (no 40250 instantiation)", "evidence": "build"}
@@ -0,0 +1,128 @@
{
"reference": "EterLib/FileLoaderThread.cpp",
"reference_sha256": "fe40ffa69088383baec56f2ef3c0b2a70448e018f5661b6aaf6dfb75e4efbf5a",
"priority": "P4",
"contracts": [],
"functions": {
"CFileLoaderThread::CFileLoaderThread": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::CFileLoaderThread"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::~CFileLoaderThread": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::~CFileLoaderThread"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Create": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Create"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Run": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Run"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::EntryPoint": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::EntryPoint"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Destroy": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Destroy"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Setup": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Setup"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Shutdown": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Shutdown"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Execute": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Execute"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Request": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Request"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Fetch": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Fetch"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
},
"CFileLoaderThread::Process": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/FileLoaderThread.cpp:CFileLoaderThread::Process"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; semaphore/thread/wait calls are the Win32Crt kernel-object shims. 40250 never Creates CResourceManager::ms_loadingThread, so Request logs the ReleaseSemaphore error and Fetch never yields, as tested."
}
}
}
@@ -0,0 +1,29 @@
{
"reference": "EterLib/GrpVertexBufferDynamic.cpp",
"reference_sha256": "8bffcb4a24733a2ee4312bf45a690a1f0b46c6290e17867b763f4799055f3d3c",
"priority": "P4",
"contracts": [],
"functions": {
"CDynamicVertexBuffer::Create": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/GrpVertexBufferDynamic.cpp:CDynamicVertexBuffer::Create"
],
"note": "Verbatim 40250. No 40250 code instantiates CDynamicVertexBuffer."
},
"CDynamicVertexBuffer::CDynamicVertexBuffer": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/GrpVertexBufferDynamic.cpp:CDynamicVertexBuffer::CDynamicVertexBuffer"
],
"note": "Verbatim 40250. No 40250 code instantiates CDynamicVertexBuffer."
},
"CDynamicVertexBuffer::~CDynamicVertexBuffer": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/GrpVertexBufferDynamic.cpp:CDynamicVertexBuffer::~CDynamicVertexBuffer"
],
"note": "Verbatim 40250. No 40250 code instantiates CDynamicVertexBuffer."
}
}
}
+48
View File
@@ -0,0 +1,48 @@
{
"reference": "EterLib/Mutex.cpp",
"reference_sha256": "b480c0ad1f568caddcb50264b6d704dac9337ee8f7631b0f19002663f36999ff",
"priority": "P4",
"contracts": [],
"functions": {
"Mutex::Mutex": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Mutex.cpp:Mutex::Mutex"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; CRITICAL_SECTION is the Win32Crt recursive-mutex shim."
},
"Mutex::~Mutex": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Mutex.cpp:Mutex::~Mutex"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; CRITICAL_SECTION is the Win32Crt recursive-mutex shim."
},
"Mutex::Lock": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Mutex.cpp:Mutex::Lock"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; CRITICAL_SECTION is the Win32Crt recursive-mutex shim."
},
"Mutex::Unlock": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Mutex.cpp:Mutex::Unlock"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; CRITICAL_SECTION is the Win32Crt recursive-mutex shim."
}
}
}
+48
View File
@@ -0,0 +1,48 @@
{
"reference": "EterLib/Thread.cpp",
"reference_sha256": "b5475b7d5d3ce06b96ab9b534346648896deb6b76f459feabb09c9f4148860b5",
"priority": "P4",
"contracts": [],
"functions": {
"CThread::CThread": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Thread.cpp:CThread::CThread"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; _beginthreadex/SetThreadPriority are the Win32Crt shims (detached std::thread, waitable handle)."
},
"CThread::Create": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Thread.cpp:CThread::Create"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; _beginthreadex/SetThreadPriority are the Win32Crt shims (detached std::thread, waitable handle)."
},
"CThread::Run": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Thread.cpp:CThread::Run"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; _beginthreadex/SetThreadPriority are the Win32Crt shims (detached std::thread, waitable handle)."
},
"CThread::EntryPoint": {
"status": "PORTED",
"impl": [
"src/platform/EterLib/Thread.cpp:CThread::EntryPoint"
],
"test": [
"tests/port/port_file_loader_thread_test.cpp"
],
"note": "Verbatim 40250; _beginthreadex/SetThreadPriority are the Win32Crt shims (detached std::thread, waitable handle)."
}
}
}