Re: [AD] Strange timer behavior in 5.2.1.1 |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
This thread got brought into private messages. Elias: -- First of all, Elias can you confirm why you wanted this in TLS? I guess it allows displays to be created in parallel, which might be a tiny advantage, though this should run pretty quickly (instantly?) But if we do go with a mutex, you can create it in d3d_init_display and destroy it in d3d_shutdown_display in d3d_disp.cpp. Declare it in d3d.h in src/win, not in include/allegro5 anywhere. -- From: Edgar Reynaldo On 8/21/2016 5:55 PM, trent@xxxxxxxxxxxxxx wrote: I think that is the simplest approach, if I’m not missing anything on why TLS was suggested to begin with. From: Edgar Reynaldo On 8/21/2016 5:18 PM, trent@xxxxxxxxxx wrote: It wouldn’t hurt to create an aintern_tls.h. As for tls_get returning NULL, you’d have to return an error to the user (eg return false or NULL, not sure the specifics.) But perhaps it would be better to use a mutex here. There’s no real reason this needs to be in TLS. So you would prefer to keep eds_list, fullscreen, and adapter static and then access them with a mutex? That would serialize the creation of the displays in ex_threads then, which is fine, and would solve the crash.
From: trent@xxxxxxxxxx I think the examples used to be built as console applications. I’m not sure why they are now built as Windows apps but maybe somebody knows. From: Edgar Reynaldo On 8/21/2016 3:41 PM, trent@xxxxxxxxxx wrote:
I'll rebuild the debug dll and have Neil test it out. Thanks for the prompt reply. |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |