ci: fix tcc compilation of atomic_test.v
parent
b7f2ef78b2
commit
624f022ddc
|
@ -300,6 +300,7 @@ const c_common_macros = '
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __TINYC__
|
#ifdef __TINYC__
|
||||||
|
#define _Atomic volatile
|
||||||
#undef EMPTY_STRUCT_DECLARATION
|
#undef EMPTY_STRUCT_DECLARATION
|
||||||
#define EMPTY_STRUCT_DECLARATION voidptr _dummy_pad
|
#define EMPTY_STRUCT_DECLARATION voidptr _dummy_pad
|
||||||
#undef EMPTY_ARRAY_OF_ELEMS
|
#undef EMPTY_ARRAY_OF_ELEMS
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
import term
|
|
||||||
import os
|
|
||||||
import runtime
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
|
@ -13,7 +10,7 @@ fn test_atomic() {
|
||||||
for i in 0 .. 10 {
|
for i in 0 .. 10 {
|
||||||
go app.run()
|
go app.run()
|
||||||
}
|
}
|
||||||
time.sleep(2 * time.second)
|
time.sleep(200 * time.millisecond)
|
||||||
println('idx=$app.idx')
|
println('idx=$app.idx')
|
||||||
assert app.idx == 10
|
assert app.idx == 10
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue