[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I´ve finally got a new computer working (previously I had a K6-200, now I have an Athlon 850, what a change!), though Win2k doesn´t boot anymore, f***ed it.
But I don´t care that much as Linux, BeOS and QNX all work nicely and really fast with the new hardware underneath, so I´m happy anyway =)
...and I can restart working on QNX Allegro - having the new faster PC made me to discover why the keyboard was not working anymore with expal; it could be a matter of thread priorities...
expal consumes a lot of CPU cycles doing PgFlush() calls (on QNX this flushes the draw buffer), so the events handling threads is postponed in the scheduled threads. You know, with pthreads execution time is always given to the thread with the highest priority, and as in expal the main thread is a lot busy, the other one which handles the keyboard among other things, is almost never executed... The result is that with my old K6-200 the keyboard was not responding anymore, even after some minutes, while with the K7-850 expal exits when a key is pressed, but with a delay of about 1 second since the keypress.
With the old computer I didn´t understand the problem, but now it´s almost clear to me it is a matter of thread priorities. Correct me if I´m wrong!
Now, how to solve this? A solution would be to give CPU time away somewhere in the main thread, but that can be done only if the programmer puts a sched_yield() call inside his loop; another solution could be to assign a priority to the threads at startup, but I don´t know if something like this is possible in pthreads, nor how to do it...
Any thoughts?
Another thing: now that WIP 3.9.36 has been released, can someone apply Eric´s patch about color conversion, so I can continue the QNX windowed driver?
Also, I´ve not seen a lot of announcements about the new WIP release... Matthew, if you´re reading this, could you post the new on allegro.cc? And who owns the Freshmeat Allegro project account, so we can update it?
--
Angelo