diff options
-rw-r--r-- | fractal-gen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fractal-gen.c b/fractal-gen.c index 5e1e146..612e7ce 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -132,10 +132,11 @@ int main(int argc, char **argv) pthread_create(§ions[i].thread, NULL, generator, &(sections[i])); } - s = &(sections[0]); + s = &(sections[cores-1]); while((x = s->idx) < s->datasize) { - fprintf(stderr, "Thread 0: %.4f%%\r", + fprintf(stderr, "Thread %d: %.4f%%\r", + cores-1, 100.f*(double)x/s->datasize); sleep(1); } |