Skip to content

Commit

Permalink
ops fixes and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahr committed Sep 28, 2024
1 parent ac930c7 commit d6aa78a
Show file tree
Hide file tree
Showing 13 changed files with 520 additions and 424 deletions.
34 changes: 0 additions & 34 deletions .githooks/pre-commit

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:
matrix:
include:
- runs-on: macos-latest
nim-version: 'ref:version-1-6'
nim-version: 'ref:version-2-0'
sanitize-threads: 'yes'
timeout-minutes: 20

- runs-on: ubuntu-latest
nim-version: 'latest:1.6'
nim-version: 'latest:2.0'
sanitize-threads: 'yes'
timeout-minutes: 5

- runs-on: ubuntu-latest
nim-version: 'latest:1.4'
nim-version: 'latest:1.6'
sanitize-threads: 'no'
timeout-minutes: 5

- runs-on: ubuntu-latest
nim-version: 'latest:1.2'
nim-version: 'latest:1.4'
sanitize-threads: 'no'
timeout-minutes: 5

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
matrix:
include:
- arch: aarch64
nim-version: 'ref:version-1-6'
nim-version: 'ref:version-2-0'

steps:
# Optimization: re-use cached Nim->C compilation
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/lint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
uses: asdf-vm/actions/install@v1
with:
tool_versions: |
nim latest:1.6
nim latest:2.0
- name: Generate documentation
run: |
. "${HOME}/.asdf/asdf.sh"
asdf local nim latest:1.6
asdf local nim latest:2.0
rm -rf htmldocs
nim doc --out:htmldocs src/lockfreequeues.nim
mv htmldocs/theindex.html htmldocs/index.html
Expand Down
25 changes: 0 additions & 25 deletions .lintballrc.json

This file was deleted.

26 changes: 0 additions & 26 deletions .yamllint.yml

This file was deleted.

8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,3 @@ CI runs the test suite for both C and C++ targets on:
- macOS `x86_64`

The test suite is also run with [LLVM thread sanitization](https://clang.llvm.org/docs/ThreadSanitizer.html) to check for data races.

### Linting

This project uses [lintball](https://github.com/elijahr/lintball) to auto-format code. Please ensure your changeset passes linting. Enable the githooks with:

```sh
git config --local core.hooksPath .githooks
```
2 changes: 1 addition & 1 deletion lockfreequeues.nimble
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

# Package
version = "3.0.0"
version = "3.1.0"
author = "Elijah Shaw-Rutschman"
description = "Lock-free queue implementations for Nim."
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/lockfreequeues/mupsic.nim
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ proc push*[N, P: static int, T](
return false

newTail = incOrReset(prevTail, 1, N)
# validateHeadAndTail(head, newTail, N)
assert validateHeadAndTail(head, newTail, N)
self.queue.producerTails[self.idx].release(newTail)

if self.queue.prevProducerIdx.compareExchangeWeak(
Expand Down Expand Up @@ -210,7 +210,7 @@ proc push*[N, P: static int, T](
count = avail

newTail = incOrReset(prevTail, count, N)
# validateHeadAndTail(head, newTail, N)
assert validateHeadAndTail(head, newTail, N)
self.queue.producerTails[self.idx].release(newTail)

if self.queue.prevProducerIdx.compareExchangeWeak(
Expand Down
Loading

0 comments on commit d6aa78a

Please sign in to comment.