diff options
author | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-31 03:04:45 +0400 |
---|---|---|
committer | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-31 03:04:45 +0400 |
commit | d2b9489594cde6024626c960697a2051e23169bb (patch) | |
tree | b9993133be04c631ac6022155f20f92d3034a13b /source/test/unittests | |
parent | 0f844d54824e1a5b756d80ca6896d1cd2553bc1c (diff) | |
download | kit-d2b9489594cde6024626c960697a2051e23169bb.zip |
test
Diffstat (limited to 'source/test/unittests')
-rw-r--r-- | source/test/unittests/atomic.test.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/test/unittests/atomic.test.c b/source/test/unittests/atomic.test.c index 8f6d22b..24cadca 100644 --- a/source/test/unittests/atomic.test.c +++ b/source/test/unittests/atomic.test.c @@ -83,7 +83,8 @@ TEST("atomic byte concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_8_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_8_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -113,7 +114,8 @@ TEST("atomic int16 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_16_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_16_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -143,7 +145,8 @@ TEST("atomic int32 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_32_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_32_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -176,7 +179,8 @@ TEST("atomic int64 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_64_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_64_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); |