From 624f022ddcce32c558604d9f6307cf4236c78fcb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 27 Apr 2022 22:50:18 +0300 Subject: [PATCH] ci: fix tcc compilation of atomic_test.v --- vlib/v/gen/c/cheaders.v | 1 + vlib/v/tests/atomic_test.v | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/vlib/v/gen/c/cheaders.v b/vlib/v/gen/c/cheaders.v index cb596e2305..bfc1444df9 100644 --- a/vlib/v/gen/c/cheaders.v +++ b/vlib/v/gen/c/cheaders.v @@ -300,6 +300,7 @@ const c_common_macros = ' #endif #ifdef __TINYC__ + #define _Atomic volatile #undef EMPTY_STRUCT_DECLARATION #define EMPTY_STRUCT_DECLARATION voidptr _dummy_pad #undef EMPTY_ARRAY_OF_ELEMS diff --git a/vlib/v/tests/atomic_test.v b/vlib/v/tests/atomic_test.v index ba66ac29b0..f5603c4784 100644 --- a/vlib/v/tests/atomic_test.v +++ b/vlib/v/tests/atomic_test.v @@ -1,6 +1,3 @@ -import term -import os -import runtime import time struct App { @@ -13,7 +10,7 @@ fn test_atomic() { for i in 0 .. 10 { go app.run() } - time.sleep(2 * time.second) + time.sleep(200 * time.millisecond) println('idx=$app.idx') assert app.idx == 10 }