Mail Archives: djgpp/1996/08/07/13:15:20
tob AT world DOT std DOT com (Tom Breton) wrote:
>alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) writes:
>> Well, I'd just call a function in main() to do it. Making it automatic
>> I would leave to the people who write the startup code... like,
>> Charles, I guess, if he think's it's cool. Otherwise, I couldn't be
>> bothered to make it automatic!
>If you just call it in main, constructors can't use anything that needs
>to be locked.
It won't be /locked/ when the constructors run... even if they install
interrupt handlers, the risk will be minimal; it'd be easy to add it
to crt1.c anyway.
>As a stopgap solution, the locker itself could be a constructor for a
>static object. You'd put a single instance of that object in a file,
>preferably the first file linked. That would also let you only include
>the library code when you had stuff to lock.
Yup.
Regards,
ABW
--
I have become... Comfortably numb...
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>
- Raw text -