From d3699a2f4d17b2f7a2372f0777885716c48f0b62 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Thu, 9 Oct 2025 17:06:51 -0700 Subject: [PATCH 1/2] Add debug build to Windows CI --- .github/workflows/ci-windows.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 3e00693a..0acfcdb2 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -29,6 +29,9 @@ jobs: timeout-minutes: 5 runs-on: windows-2022 name: CI-windows (build) + strategy: + matrix: + build_type: [Release, Debug] steps: - uses: actions/checkout@v2 @@ -36,8 +39,8 @@ jobs: - name: Configure build system run: | cmake --version - cmake -S . -B build_x64 -A x64 -G "Visual Studio 17 2022" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON + cmake -S . -B build_x64 -A x64 -G "Visual Studio 17 2022" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_VERBOSE_MAKEFILE=ON - name: Build libkqueue run: | - cmake --build build_x64 --target install --config Release --parallel 1 + cmake --build build_x64 --target install --config ${{ matrix.build_type }} --parallel 1 From 10953b5b1834169aea9a6ad31f705d37b08a6548 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Thu, 9 Oct 2025 18:28:02 -0700 Subject: [PATCH 2/2] Revert checking return code from mutex unlocking on Windows --- src/common/debug.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/debug.h b/src/common/debug.h index ab1846c2..0358a778 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -144,6 +144,14 @@ typedef struct { } \ } while (0) +#ifdef _WIN32 +# define tracing_mutex_unlock(x) do { \ + (x)->mtx_status = MTX_UNLOCKED; \ + (x)->mtx_owner = -1; \ + pthread_mutex_unlock(&((x)->mtx_lock)); \ + dbg_printf("[%i]: unlocked %s", __LINE__, # x); \ +} while (0) +#else # define tracing_mutex_unlock(x) do { \ (x)->mtx_status = MTX_UNLOCKED; \ (x)->mtx_owner = -1; \ @@ -153,6 +161,7 @@ typedef struct { }; \ dbg_printf("[%i]: unlocked %s", __LINE__, # x); \ } while (0) +#endif typedef void (*dbg_func_t)(char const *fmt, ...);