www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/13:15:20

Xref: news2.mv.net comp.os.msdos.djgpp:6770
From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: __attribute__((section))
Date: Sat, 03 Aug 1996 15:01:20 GMT
Lines: 32
Message-ID: <839084372.8973.0@abwillms.demon.co.uk>
References: <838930289 DOT 23607 DOT 0 AT abwillms DOT demon DOT co DOT uk> <DvHuo8 DOT 2pv AT world DOT std DOT com>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019