mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
updated some printfs, added comment about sched_yield
This commit is contained in:
parent
59e0faaa5c
commit
30655c211c
1 changed files with 7 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue