summary refs log tree commit diff stats
path: root/lib/pure/concurrency/atomics.nim
Commit message (Collapse)AuthorAgeFilesLines
* make C++ atomic opt in via -d:nimUseCppAtomics (#24209)metagn2024-09-301-1/+4
| | | | | | | refs #24207 The `-d:nimUseCAtomics` flag added in #24207 is now inverted and made into `-d:nimUseCppAtomics`, which means C++ atomics are only enabled with the define. This flag is now also documented and tested.
* allow C atomics on C++ with -d:nimUseCAtomics (#24207)metagn2024-09-301-25/+40
| | | | | | | | refs https://github.com/nim-lang/Nim/pull/24200#issuecomment-2382501282 Workaround for C++ Atomic[T] issues that doesn't require a compiler change. Not tested or documented in case it's not meant to be officially supported, locally tested `tatomics` and #24159 to work with it though, can add these as tests if required.
* Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the ↵ringabout2023-01-271-1/+1
| | | | | | | default definition would be ill-formed " (#21307) Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed (#21169)" This reverts commit a7bae919adb952362cb53206140872d2b7424b47.
* Fix #13093 C++ Atomics: operator= is implicitly deleted because the default ↵Bung2023-01-271-1/+1
| | | | | | | | | | | | | definition would be ill-formed (#21169) * add test * fix #17982 Invalid C++ code generation when returning discardable var T * fix #13093 * cpp atomic good example * clearify the condition
* fixes broken importc for vcc [backport] (#20909)ringabout2022-11-241-2/+2
| | | fixes broken imports for vcc
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * remove deprecated pragma syntax from 0.20.0 closes #4651, closes #16653 with a cheap fix for now due to how early `tfFinal` is set * remove type pragma between name and generics * undo removal, try removing bind expression (0.8.14) * fix test, unremove bind expr * remove again * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * dependencies @ HEAD & weave test dependencies * try fix package ci Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Resolve cross file resolution errors in atomics (#19422) [backport:1.6]James2022-01-201-10/+7
| | | | | * Resolve call undeclared routine testAndSet * Fix undeclared field atomicType
* fix #18844 (#18851)flywind2021-09-201-4/+4
|
* remove unnecessary deps (#17307)flywind2021-03-091-2/+0
| | | | | | | * improve test coverage for isolation * a bit better * remove unnecessary deps
* use typeof instead type (#16962)flywind2021-02-081-1/+1
|
* add simple runnableExamples for atomics (#16116)flywind2020-11-241-0/+40
|
* fix #12726 Cannot take the compile-time sizeof Atomic types (#15928)Bung2020-11-121-7/+8
| | | | | * fix #12726 Cannot take the compile-time sizeof Atomic types * fix for arch 32
* Add test coverage for atomics (#15193)Elijah Shaw-Rutschman2020-08-181-7/+7
| | | | | | | | | | | | | | | * Add test coverage for atomics Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com> * Fix compareExchange bugs for non-trivial objects Bugs fixed: 1. compareExchange would not set the desired value in the success case. 2. compareExchange would not set var expected to the found value in the failure case. 3. withLock would spin forever running the unit tests. try..body..finally prevents this. Not sure why this makes a difference, since an exception wasn’t being raised, but clearing the guard in a finally block seems correct anyways. Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com>
* Fix #12812Clyybber2019-12-051-1/+1
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* last stdlib cleanupsAraq2019-09-211-12/+13
|
* Fix compilation w/ Atomic[T] types (#10607)LemonBoy2019-02-131-2/+2
|
* Fixes new atomics for C + vcc (#10267)Jörg Wollenschläger2019-01-111-21/+21
|
* [RFC] Better atomics (#8620)Jörg Wollenschläger2019-01-101-0/+378
* Initial version of C++11 style atomics * Make Atomic[T] always concrete