Merging in 2.0.2.

This commit is contained in:
Geoffrey Challen
2017-01-09 22:37:50 -05:00
parent a0406ec181
commit 50cf3276e7
118 changed files with 1350 additions and 3158 deletions

View File

@@ -229,7 +229,7 @@ runit(unsigned numthinkers, unsigned numgrinders,
char buf[32];
unsigned i;
tprintf("Running with %u thinkers, %u grinders, and %u pong groups "
printf("Running with %u thinkers, %u grinders, and %u pong groups "
"of size %u each.\n", numthinkers, numgrinders, numponggroups,
ponggroupsize);
@@ -242,7 +242,7 @@ runit(unsigned numthinkers, unsigned numgrinders,
&pids[i+2]);
}
usem_open(&startsem);
tprintf("Forking done; starting the workload.\n");
printf("Forking done; starting the workload.\n");
__time(&startsecs, &startnsecs);
Vn(&startsem, numthinkers + numgrinders +
numponggroups * ponggroupsize);
@@ -252,20 +252,20 @@ runit(unsigned numthinkers, unsigned numgrinders,
openresultsfile(O_RDONLY);
tprintf("--- Timings ---\n");
printf("--- Timings ---\n");
if (numthinkers > 0) {
calcresult(0, startsecs, startnsecs, buf, sizeof(buf));
tprintf("Thinkers: %s\n", buf);
printf("Thinkers: %s\n", buf);
}
if (numgrinders > 0) {
calcresult(1, startsecs, startnsecs, buf, sizeof(buf));
tprintf("Grinders: %s\n", buf);
printf("Grinders: %s\n", buf);
}
for (i=0; i<numponggroups; i++) {
calcresult(i+2, startsecs, startnsecs, buf, sizeof(buf));
tprintf("Pong group %u: %s\n", i, buf);
printf("Pong group %u: %s\n", i, buf);
}
closeresultsfile();

View File

@@ -100,7 +100,7 @@ pong_cyclic(unsigned id)
P(&sems[id]);
}
#ifdef VERBOSE_PONG
tprintf(" %u", id);
printf(" %u", id);
#else
if (nextid == 0 && i % 16 == 0) {
putchar('.');
@@ -151,7 +151,7 @@ pong_reciprocating(unsigned id)
P(&sems[id]);
}
#ifdef VERBOSE_PONG
tprintf(" %u", id);
printf(" %u", id);
#else
if (id == 0 && i % 16 == 0) {
putchar('.');
@@ -197,11 +197,11 @@ pong(unsigned groupid, unsigned id)
waitstart();
pong_cyclic(id);
#ifdef VERBOSE_PONG
tprintf("--------------------------------\n");
printf("--------------------------------\n");
#endif
pong_reciprocating(id);
#ifdef VERBOSE_PONG
tprintf("--------------------------------\n");
printf("--------------------------------\n");
#endif
pong_cyclic(id);