Re: [AD] Patch to fix race condition |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Patch to fix race condition
- From: "Trent Gamblin" <trent@xxxxxxxxxx>
- Date: Sun, 28 Feb 2010 21:33:57 -0700 (MST)
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 :{)>