Changeset: 8bae3de59203 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8bae3de59203
Modified Files:
        clients/examples/C/testcondvar.c
Branch: Sep2022
Log Message:

Remove a part of testcondvar.c that does not make sense

The test assumed that if we signal three times. each of the three
workers will wake once. But it is equally well allowed be that one
worker wakes three times and the others not at all.

Interestingly, the assumption generally seems to hold on Windows and
Linux, where this test has been run very often, but it fails on
FreeBSD.


diffs (26 lines):

diff --git a/clients/examples/C/testcondvar.c b/clients/examples/C/testcondvar.c
--- a/clients/examples/C/testcondvar.c
+++ b/clients/examples/C/testcondvar.c
@@ -149,22 +149,6 @@ main(void)
        let_run();
        check(3, 1, 0);
 
-       // when using signal, we need to trigger them three times
-       clear();
-       for (int i = 0; i < NN; i++)
-               states[i].permits = 1;
-       let_run();
-       check(0, 0, 3);
-       MT_cond_signal(&condvar);
-       let_run();
-       check(1, 1, 2);
-       MT_cond_signal(&condvar);
-       let_run();
-       check(2, 1, 1);
-       MT_cond_signal(&condvar);
-       let_run();
-       check(3, 1, 0);
-
        for (int i = 0; i < NN; i++) {
                states[i].terminate = true;
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to