Tim Blechmann
a5cc8c0430
modernisation: use c++14 where possible
2024-05-03 14:45:42 +08:00
Tim Blechmann
fdbccb9253
build system: fix cmake tests
2023-12-17 15:11:40 +08:00
Tim Blechmann
f2a934205e
cmake: add boost_lockfree_test_common for better ide integration
2023-11-23 13:13:44 +08:00
Tim Blechmann
e04bf59236
stack/queue - add missing allocator ctor
2023-11-03 21:33:09 +08:00
Tim Blechmann
bafa33be67
tests: cleanups
2023-11-03 14:59:50 +08:00
Tim Blechmann
8b25ed24db
tests: use modern boost.test macros
2023-11-03 14:59:50 +08:00
Tim Blechmann
e3b6eb8d1f
tests: silence warnings
2023-11-03 14:59:50 +08:00
Tim Blechmann
3ccac29ae3
import pre-commit and clang-format
2023-11-03 14:59:50 +08:00
Tim Blechmann
dba9b10b2b
build system: polish cmake build system
2023-11-03 14:59:50 +08:00
msuvajac
af906f5745
stack, spsc_queue: don't create temporaries when deleting elements
...
When destructors/reset() are called temporary object was being created.
That creates issues when element doesn't have default initialization
(e.g. Boost.Interprocess containers).
2021-09-17 10:14:38 +02:00
Tim Blechmann
2ed9300ad5
tests: c++03 compatibility
2021-04-18 12:10:53 +08:00
Tim Blechmann
f568ba9319
spsc_queue: fix destruction of elements
...
the compile-time sized implementation did not properly destroy the
elements.
fixes #66
2021-03-25 15:04:35 +08:00
Austin Beer
41570c256e
Fix CI failures with clang on Linux
...
LLVM generates atomic library calls that must be satisfied
https://llvm.org/docs/Atomics.html#libcalls-atomic
2019-12-05 17:35:26 -07:00
liang zhou
4ef74379c2
Why modify freelist_test.cpp and test_common.hpp :
...
In VxWorks Kernel, the re-schedule mechanism does not enable "round-robin" reschdule between the same priority tasks by default. So the case "stack_unbounded_stress_test" will lead to test case hang forever. Here's the details:
The test case creates 4 tasks as “Reader”, and then 4 tasks as “Writer”, all those 8 task has the same priority 220.
If the target has 2 cores, the first 2 reader tasks will occupy the cores by “while (1)” without yield, so the other 2 readers tasks and 4 writers tasks have no chance to be run.
This will lead to the test case loop forever , then the exp scrip will catch it and print “RTP Execution Timeout; rebooting”
The test case creates 4 tasks as “Reader”, and then 4 tasks as “Writer”, all those 8 task has the same priority 220 in VxWorks Kernel.
If the target has 2 cores, the first 2 reader tasks will occupy the cores by “while (1)” without yield, so the other 2 readers tasks and 4 writers tasks have no chance to be run.
This will lead to the test case loop forever without any ending.
Why modify spsc_queue_stress_test.cpp :
In VxWorks user-land task (Wind River calls it as RTP), the max number of objects (the internal data structure RTP uses) in one RTP is limited at most 65535.
When the test is selected to run, the C++ constructor will create 1<<16 number of mutex via "new spsc_queue_tester".
And after test1->run() is finished, the C++ destructor will delete 1<<16 number of mutex by default.
This caused the problem, because VxWorks just support ((1<<16)-1) objects within an RTP.
2018-11-12 15:25:39 +08:00
Tim Blechmann
ffa371d6d8
build system: fix travis integration
2018-11-05 16:14:55 +08:00
Tim Blechmann
dcaba572e8
testsuite: avoid namespace std
2018-03-28 10:08:50 +02:00
Tim Blechmann
8e98981c21
Merge pull request #32 from DanielaE/fix/missing-include
...
Fix compilation errors regarding undefined symbol 'cout' because of m…
2017-05-20 17:10:49 +02:00
Daniela Engert
7b63352a00
Conditionally replace deprecated/removed std::auto_ptr by std::unique_ptr.
...
Signed-off-by: Daniela Engert <dani@ngrt.de >
2017-05-12 17:30:54 +02:00
Daniela Engert
582b27bf0b
Fix compilation errors regarding undefined symbol 'cout' because of missing include <iostream>.
...
Signed-off-by: Daniela Engert <dani@ngrt.de >
2017-05-12 17:27:31 +02:00
Tim Blechmann
400226ad43
lockfree: introduce a foward header
2016-07-29 21:27:37 +02:00
Tim Blechmann
3b58aa9af1
stack: implement consume_all_atomic_reversed
2016-07-26 13:32:42 +02:00
Tim Blechmann
cf6632e262
stack: implement consume_all_atomic
2016-07-26 12:21:04 +02:00
Tim Blechmann
eb21dd050b
test: fix testsuite
2015-10-04 15:08:20 +02:00
Tim Blechmann
6454f9fb85
spsc_queue: fix reset()
2014-11-08 23:32:33 +01:00
Marcel Raad
9b127e5da9
Add missing includes
...
This fixes the compile breaks in the regression tests.
2014-09-29 17:49:03 +02:00
erenon
d77e119bac
spsc_queue: non-const T& front() added and tested
2014-06-26 08:49:51 +02:00
erenon
66dae3a792
add T& front() and void pop() capabilities to spsc_queue
2014-06-25 19:16:08 +02:00
Tim Blechmann
38ea6b082b
jam file fix
2014-04-09 19:20:54 +02:00
Tim Blechmann
da5ec85778
lockfree: spsc-queue - add read_available and write_available members
...
[SVN r86736]
2013-11-17 10:49:47 +00:00
Tim Blechmann
4663348be0
lockfree: use lock_guard instead of the deprecated boost::mutex::scoped_lock
...
fixes #8838
[SVN r85196]
2013-08-03 09:08:32 +00:00
Tim Blechmann
85fd0b1356
lockfree: explicitly use bitmask to prevent aba tag overflow
...
workaround for msvc run-time check failure
[SVN r84723]
2013-06-10 12:31:38 +00:00
Tim Blechmann
d9f89ec5c9
lockfree: prevent warnings for unused arguments
...
Signed-off-by: Tim Blechmann <tim@klingt.org >
[SVN r84618]
2013-06-03 09:48:47 +00:00
Tim Blechmann
b6c2f7cf1e
lockfree: fix stack::reserve
...
[SVN r84403]
2013-05-21 15:24:20 +00:00
Tim Blechmann
65cb3432d1
lockfree: spsc-queue - capacity should take the internal marker object into account
...
fixes #8560
[SVN r84387]
2013-05-20 09:28:56 +00:00
Tim Blechmann
421e9d8c2c
lockfree: testsuite - possible compile fix for IBM compiler
...
[SVN r83277]
2013-03-03 13:18:31 +00:00
Tim Blechmann
7388036785
lockfree: testsuite - move stress tests to separate file
...
[SVN r83276]
2013-03-03 13:13:01 +00:00
Tim Blechmann
e8e89220f6
lockfree: introduce consume_one and consume_all methods
...
[SVN r83275]
2013-03-03 13:07:50 +00:00
Tim Blechmann
95342e5ea6
lockfree: fix some warnings in testsuite
...
[SVN r82210]
2012-12-26 10:38:53 +00:00
Tim Blechmann
fca8f920d3
lockfree: fix testsuite
...
[SVN r82182]
2012-12-23 10:15:23 +00:00
Tim Blechmann
4c5b485068
lockfree: fix race condition in testsuite
...
[SVN r82169]
2012-12-22 15:50:31 +00:00
Tim Blechmann
7afb51f7af
lockfree: test fixes
...
[SVN r82145]
2012-12-21 13:04:10 +00:00
Tim Blechmann
54ec924cd7
lockfree: fix race condition in testsuite
...
thanks to peter dimov!
[SVN r82104]
2012-12-19 19:23:55 +00:00
Tim Blechmann
1aa72418bc
lockfree: testsuite cleanup
...
[SVN r81742]
2012-12-06 15:41:40 +00:00
Tim Blechmann
5c35fb4117
lockfree: fix test case on certain compilers
...
[SVN r81741]
2012-12-06 14:12:48 +00:00
Tim Blechmann
eac9b5fe47
lockfree: testsuite build fix
...
[SVN r81479]
2012-11-22 10:56:12 +00:00
Tim Blechmann
806ca975a3
lockfree: possible workarounds for testsuite failures
...
Signed-off-by: Tim Blechmann <tim@klingt.org >
[SVN r81391]
2012-11-17 11:36:36 +00:00
Tim Blechmann
1c67ecf90f
lockfree: cleanups in testsuite
...
[SVN r81317]
2012-11-13 10:59:27 +00:00
Tim Blechmann
18af8efb28
lockfree: relax freelist tests
...
[SVN r80700]
2012-09-25 14:05:56 +00:00
Tim Blechmann
c732d7fd31
lockfree: relax stress tests
...
the testsuite seems to take too much time for some test farm machines
Signed-off-by: Tim Blechmann <tim@klingt.org >
[SVN r80666]
2012-09-23 12:32:49 +00:00
Jürgen Hunold
bbbc8fcf7a
Fix min-max guideline violations
...
Fix some conversion warnings from msvc
[SVN r80627]
2012-09-22 15:40:07 +00:00