summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-15 20:30:17 +0000
committerBrian Paul <[email protected]>2006-03-15 20:30:17 +0000
commit30655c211c97a69f0eeb9ad6176ca1db67d15bf9 (patch)
tree4a3dc6d88c75826bab022a32d30683d861e4cb0c
parent59e0faaa5c601ace51608c6d03c57d17498f796b (diff)
updated some printfs, added comment about sched_yield
-rw-r--r--progs/xdemos/glthreads.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/progs/xdemos/glthreads.c b/progs/xdemos/glthreads.c
index e3d71ed0ad5..aeb6a666319 100644
--- a/progs/xdemos/glthreads.c
+++ b/progs/xdemos/glthreads.c
@@ -175,6 +175,10 @@ draw_loop(struct winthread *wt)
glXSwapBuffers(wt->Dpy, wt->Win);
wt->Angle += 1.0;
+
+ /* XXX Calling sched_yield() here smooths out performance a lot! */
+ /* Not sure how portable it is though, so leave out for now. */
+ /*sched_yield();*/
}
}
@@ -334,9 +338,9 @@ main(int argc, char *argv[])
Status threadStat;
if (argc == 1) {
- printf("threadgl: test of GL thread safety (any key = exit)\n");
+ printf("glthreads: test of GL thread safety (any key = exit)\n");
printf("Usage:\n");
- printf(" threadgl [-display dpyName] [-n numthreads]\n");
+ printf(" glthreads [-display dpyName] [-n numthreads]\n");
}
else {
int i;
@@ -387,7 +391,7 @@ main(int argc, char *argv[])
for (i = 0; i < numThreads; i++) {
pthread_create(&WinThreads[i].Thread, NULL, thread_function,
(void*) &WinThreads[i]);
- printf("Created Thread %d\n", (int) WinThreads[i].Thread);
+ printf("Created Thread %u\n", (unsigned int) WinThreads[i].Thread);
}
event_loop(dpy);