Skip to content

Commit a9e03d8

Browse files
committed
Expand some NORACE annotations
1 parent 814cd11 commit a9e03d8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/regression/04-mutex/27-base_rc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void bad() {
99
}
1010
void good() {
1111
pthread_mutex_lock(&gm);
12-
global++; // NORACE (MHP)
12+
global++; // NORACE (same unique thread with bad, same lock with main)
1313
pthread_mutex_unlock(&gm);
1414
}
1515

tests/regression/04-mutex/35-trylock_rc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void *monitor_thread (void *arg) {
4949
if (status != EBUSY) {
5050
if (status != 0)
5151
err_abort (status, "Trylock mutex");
52-
printf ("Counter is %ld\n", counter/SPIN); // NORACE (MHP)
52+
printf ("Counter is %ld\n", counter/SPIN); // NORACE (same lock with counter_thread, same unique thread with monitor_thread)
5353
status = pthread_mutex_unlock (&mutex);
5454
if (status != 0)
5555
err_abort (status, "Unlock mutex");

tests/regression/10-synch/12-join_rc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main(void) {
1818
for (i=0; i<10; i++)
1919
pthread_create(&id[i], NULL, t_fun, NULL);
2020
pthread_mutex_lock(&mutex);
21-
myglobal=myglobal+1; // NORACE (MHP)
21+
myglobal=myglobal+1; // NORACE (same lock with t_fun, same unique thread with main)
2222
pthread_mutex_unlock(&mutex);
2323
for (i=0; i<9; i++)
2424
pthread_join(id[i], NULL);

tests/regression/53-races-mhp/03-not-created_rc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void *t_fun2(void *arg) {
1919
int main(void) {
2020
pthread_t id, id2;
2121
pthread_create(&id, NULL, t_fun, NULL); // enter multithreaded
22-
myglobal = 5; // NORACE
22+
myglobal = 5; // NORACE (MHP, t_fun2 not yet created, same unique thread with main)
2323

2424
pthread_create(&id2, NULL, t_fun2, NULL);
2525
pthread_mutex_lock(&mutex2);

0 commit comments

Comments
 (0)