From: Michael P. <mic...@gm...> - 2010-01-27 04:25:44
|
Michael Plante wrote: >> Not sure. But you wouldn't use it in such a way that it matters, if you use it at all. >> Creating an unowned mutex is no big deal wrt initialization order, you just need to check >> it didn't fail in init (it's okay to check every time; it will never become non-null). Typo. "It will never become NULL (if it was ever non-NULL)." Sorry. Also, you might look at #pragma init_seg , but I really think that opens a can of worms. You then might have to consider whether it's a static lib or DLL. It's still best if you don't do anything order-dependent. And, to complicate things, just because you use a static lib doesn't mean it can't be linked into someone else's DLL... Michael |