Re: [AD] Patch to fix race condition

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, February 28, 2010 9:06 pm, Peter Wang said:
> I see.  There are al_set_errno calls elsewhere though.

Yes, it's not a very good fix.

>> (unless as Thomas says TLS can be initialized earlier and we avoid
>> the whole mess).
>
> Would calling pthreads_thread_init in _al_pthreads_tls_init help?
> (just from browsing the code, mind you)

Possibly. I can try it out. It's called on a thread by thread basis
as you create new threads though so I guess it just means
al_init has to be called from the main thread. Not sure if that's
satisfactory on all ports.

Trent :{)>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/