Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Create output directory
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Create output directory
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Install Ninja
Expand All @@ -115,7 +115,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Install Ninja
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Install Ninja
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
key: v2-${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Create output directory
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.arch }}
key: v2-${{ github.job }}-${{ matrix.arch }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Force compiler binary mtime
Expand Down Expand Up @@ -303,9 +303,9 @@ jobs:
uses: actions/cache/restore@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}
key: v2-${{ github.job }}
restore-keys: |
${{ github.job }}-
v2-${{ github.job }}-
- name: Build and run tests
if: ${{ inputs.run-tests }}
env:
Expand All @@ -324,7 +324,7 @@ jobs:
uses: actions/cache/save@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}-${{ github.sha }}
key: v2-${{ github.job }}-${{ github.sha }}

bazel-linux-aarch64-clang18:
runs-on: arm-ubuntu-arm-22.04-4core
Expand All @@ -346,9 +346,9 @@ jobs:
uses: actions/cache/restore@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}
key: v2-${{ github.job }}
restore-keys: |
${{ github.job }}-
v2-${{ github.job }}-
- name: Build and run tests
if: ${{ inputs.run-tests }}
env:
Expand All @@ -367,7 +367,7 @@ jobs:
uses: actions/cache/save@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}-${{ github.sha }}
key: v2-${{ github.job }}-${{ github.sha }}

bazel-linux-x86_64-gcc-9:
runs-on: ubuntu-22.04-8core
Expand All @@ -390,9 +390,9 @@ jobs:
uses: actions/cache/restore@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}
key: v2-${{ github.job }}
restore-keys: |
${{ github.job }}-
v2-${{ github.job }}-
- name: Build tests
run: |
bazel build ${BAZEL_DEFINES} :pthreadpool_test :pthreadpool_cxx_test
Expand All @@ -412,4 +412,4 @@ jobs:
uses: actions/cache/save@v4
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}-${{ github.sha }}
key: v2-${{ github.job }}-${{ github.sha }}
8 changes: 4 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ module(
)

# Bazel rule definitions
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.7.0")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
Expand All @@ -17,10 +17,10 @@ pip.parse(
use_repo(pip, "pip")

# Bazel Skylib.
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_skylib", version = "1.8.2")

# Bazel Platforms
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "platforms", version = "1.0.0")

# TODO: some (most? all?) of the http_archive() calls below could become bazel_dep() calls,
# but it would require verifying that the semver provided by the Bazel registry matches the hash
Expand Down
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ workspace(name = "pthreadpool")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Bazel rule definitions
http_archive(
name = "rules_cc",
strip_prefix = "rules_cc-main",
urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip"],
)

# LINT.IfChange(googletest)
# Google Test framework, used by most unit-tests.
http_archive(
Expand Down
10 changes: 10 additions & 0 deletions include/pthreadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ typedef void (*pthreadpool_task_3d_tile_1d_dynamic_with_id_with_thread_t)(
*/
#define PTHREADPOOL_FLAG_DONT_SPIN_WORKERS 0x00000004

// Disable function sanitization here. The thread pool calls these functions
// via function pointers with void* contexts, which triggers false positives in
// the function sanitizer when casting and calling the actual context type.
#if defined(__clang__) && __has_attribute(no_sanitize)
#define PTHREADPOOL_NO_SANITIZE_FUNCTION \
__attribute__((no_sanitize("function")))
#else
#define PTHREADPOOL_NO_SANITIZE_FUNCTION
#endif

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Loading
Loading