File: race_condition_test_litl_write_multiple_threads

package info (click to toggle)
litl 0.1.9-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,188 kB
  • sloc: sh: 4,251; ansic: 3,322; makefile: 138
file content (19 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
commit e3e1543b31ed686f05ac53ded9ec501a29937063
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Wed Sep 25 17:33:35 2019 +0200

    fix a race condition in test_litl_write_multiple_threads* tests

diff --git a/tests/test_litl_write_multiple_threads.c b/tests/test_litl_write_multiple_threads.c
index b2f367c..130bf67 100644
--- a/tests/test_litl_write_multiple_threads.c
+++ b/tests/test_litl_write_multiple_threads.c
@@ -25,7 +25,7 @@
 #define NBEVENT (NBITER * 12)
 
 static litl_write_trace_t* __trace;
-int total_recorded_events = 0;
+_Atomic int total_recorded_events = 0;
 
 /*
  * Records several traces at the same time