Hello Thomas and others,

there is bug in cyclictest-v0.11 which prevents it to corectly
wait for finishing of all threads.
The allstopped is signaled even if only one thread reaches
maximal count. The result is different loops count
for lower priority threads.

Best wishes

                Pavel Pisa
        e-mail: [EMAIL PROTECTED]
        www:    http://cmp.felk.cvut.cz/~pisa
        work:   http://www.pikron.com


--- cyclictest.c.orig   2006-12-15 21:04:16.000000000 +0100
+++ cyclictest.c        2006-12-15 21:23:19.000000000 +0100
@@ -480,7 +480,7 @@
 
        while (!shutdown) {
                char lavg[256];
-               int fd, len, allstopped = 0;
+               int fd, len, allstopped;
 
                if (!verbose && !quiet) {
                        fd = open("/proc/loadavg", O_RDONLY, 0666);
@@ -490,11 +490,13 @@
                        printf("%s          \n\n", lavg);
                }
 
+               allstopped = max_cycles ? 1 : 0;
+
                for (i = 0; i < num_threads; i++) {
 
                        print_stat(&par[i], i, verbose);
-                       if(max_cycles && stat[i].cycles >= max_cycles)
-                               allstopped++;
+                       if(stat[i].cycles < max_cycles)
+                               allstopped = 0;
                }
                usleep(10000);
                if (shutdown || allstopped)
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to