[AD] Fwd: OSX - lockup |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Cheers Pete Begin forwarded message:
From: Peter Hull <peter.hull90@xxxxxxxxxx> Date: Thu Sep 8, 2005 9:57:42 pm Europe/London To: Peter Hull <peter.hull90@xxxxxxxxxx> Subject: Re: OSX - lockup On Thursday, September 1, 2005, at 06:59 am, Peter Hull wrote:More of a note to myself, really, as I'm away this weekend. Solak has found a lock-up when using vsync() whilst the screen is acquiredOK, here is the proposed fix. If you call vsync() when the screen is acquired, it will do nothing in release builds and assert in debug builds. I think it's still possible to get a race condition that will sometimes lock things up iff you're calling vsync from a different thread to the drawing thread, but surely no-one would be daft enough to do that, would they?http://www.allegro.cc/forums/view_thread.php?_id=524355 acquire_bitmap(screen); vsync(); /* problem here */ rect(10, 10, SCREEN_W - 10, SCREEN_H - 10, makecol(255, 255, 255)); release_bitmap(screen); vsync();I'll send a fix in soon; I think the most sensible course is that vsync should be a no-op if the screen is acquired. Any comments?Also, for discussion, is a change to the docs to remind people not to do too much stuff while the screen is locked. The paragraph is still rather DOS/Windows-centric though, should it be made more general? (i.e. the bit about locking DirectDraw surfaces)Pete
Attachment:
vsync.osx.diff
Description: Binary data
Attachment:
vsync.docs.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |