[AD] spin lock in xvtable.c |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hello, In all the functions in xvtable.c, the first line of code is essentially a semaphore to allow for reentrant calls( i guess to make it multithreaded which it cant do anyway ). Since the code simply calls the same function again, it has the same functionallity as a while loop but with the overhead of a function call. This could also lead to a stack overflow if the function is called repeatedly. Attached is a patch that simply changes the function call to a while loop. Is there is reason this should not be done? later--, jon
Attachment:
xvtable.c.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |