diff --git a/examples/common/entry/entry_glfw.cpp b/examples/common/entry/entry_glfw.cpp index 7ed2a8fc7..0ff8fd31c 100644 --- a/examples/common/entry/entry_glfw.cpp +++ b/examples/common/entry/entry_glfw.cpp @@ -589,7 +589,7 @@ namespace entry WindowHandle findHandle(GLFWwindow* _window) { - bx::LwMutexScope scope(m_lock); + bx::MutexScope scope(m_lock); for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii) { uint16_t idx = m_windowAlloc.getHandleAt(ii); @@ -615,7 +615,7 @@ namespace entry bx::Thread m_thread; EventQueue m_eventQueue; - bx::LwMutex m_lock; + bx::Mutex m_lock; GLFWwindow* m_windows[ENTRY_CONFIG_MAX_WINDOWS]; bx::HandleAllocT m_windowAlloc; diff --git a/examples/common/entry/entry_sdl.cpp b/examples/common/entry/entry_sdl.cpp index 8e80e0ea5..5514b464f 100644 --- a/examples/common/entry/entry_sdl.cpp +++ b/examples/common/entry/entry_sdl.cpp @@ -923,7 +923,7 @@ namespace entry WindowHandle findHandle(SDL_Window* _window) { - bx::LwMutexScope scope(m_lock); + bx::MutexScope scope(m_lock); for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii) { uint16_t idx = m_windowAlloc.getHandleAt(ii); @@ -972,7 +972,7 @@ namespace entry bx::Thread m_thread; EventQueue m_eventQueue; - bx::LwMutex m_lock; + bx::Mutex m_lock; bx::HandleAllocT m_windowAlloc; SDL_Window* m_window[ENTRY_CONFIG_MAX_WINDOWS]; @@ -1011,7 +1011,7 @@ namespace entry WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title) { - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); WindowHandle handle = { s_ctx.m_windowAlloc.alloc() }; if (UINT16_MAX != handle.idx) @@ -1036,7 +1036,7 @@ namespace entry { sdlPostEvent(SDL_USER_WINDOW_DESTROY, _handle); - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); s_ctx.m_windowAlloc.free(_handle.idx); } } diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 1184f2055..b89e5864b 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -831,7 +831,7 @@ namespace entry WindowHandle findHandle(HWND _hwnd) { - bx::LwMutexScope scope(m_lock); + bx::MutexScope scope(m_lock); for (uint16_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii) { uint16_t idx = m_windowAlloc.getHandleAt(ii); @@ -969,7 +969,7 @@ namespace entry static LRESULT CALLBACK wndProc(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam); EventQueue m_eventQueue; - bx::LwMutex m_lock; + bx::Mutex m_lock; bx::HandleAllocT m_windowAlloc; @@ -1020,7 +1020,7 @@ namespace entry WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title) { - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); WindowHandle handle = { s_ctx.m_windowAlloc.alloc() }; if (UINT16_MAX != handle.idx) @@ -1044,7 +1044,7 @@ namespace entry { PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_DESTROY, _handle.idx, 0); - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); s_ctx.m_windowAlloc.free(_handle.idx); } } diff --git a/examples/common/entry/entry_x11.cpp b/examples/common/entry/entry_x11.cpp index 6ab1351e1..78e4306eb 100644 --- a/examples/common/entry/entry_x11.cpp +++ b/examples/common/entry/entry_x11.cpp @@ -640,7 +640,7 @@ namespace entry WindowHandle findHandle(Window _window) { - bx::LwMutexScope scope(m_lock); + bx::MutexScope scope(m_lock); for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii) { uint16_t idx = m_windowAlloc.getHandleAt(ii); @@ -663,7 +663,7 @@ namespace entry int32_t m_mz; EventQueue m_eventQueue; - bx::LwMutex m_lock; + bx::Mutex m_lock; bx::HandleAllocT m_windowAlloc; int32_t m_depth; @@ -704,7 +704,7 @@ namespace entry WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title) { - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); WindowHandle handle = { s_ctx.m_windowAlloc.alloc() }; if (isValid(handle) ) @@ -730,7 +730,7 @@ namespace entry XUnmapWindow(s_ctx.m_display, s_ctx.m_window[_handle.idx]); XDestroyWindow(s_ctx.m_display, s_ctx.m_window[_handle.idx]); - bx::LwMutexScope scope(s_ctx.m_lock); + bx::MutexScope scope(s_ctx.m_lock); s_ctx.m_windowAlloc.free(_handle.idx); } } diff --git a/src/bgfx.cpp b/src/bgfx.cpp index d35d3b7dc..c59930e11 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -171,7 +171,7 @@ namespace bgfx { #if BGFX_CONFIG_MEMORY_TRACKING { - bx::LwMutexScope scope(m_mutex); + bx::MutexScope scope(m_mutex); BX_CHECK(m_numBlocks > 0, "Number of blocks is 0. Possible alloc/free mismatch?"); --m_numBlocks; } @@ -193,7 +193,7 @@ namespace bgfx { #if BGFX_CONFIG_MEMORY_TRACKING { - bx::LwMutexScope scope(m_mutex); + bx::MutexScope scope(m_mutex); ++m_numBlocks; m_maxBlocks = bx::uint32_max(m_maxBlocks, m_numBlocks); } @@ -210,7 +210,7 @@ namespace bgfx #if BGFX_CONFIG_MEMORY_TRACKING if (NULL == _ptr) { - bx::LwMutexScope scope(m_mutex); + bx::MutexScope scope(m_mutex); ++m_numBlocks; m_maxBlocks = bx::uint32_max(m_maxBlocks, m_numBlocks); }