www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/11:30:19

Xref: news2.mv.net comp.os.msdos.djgpp:6787
Newsgroups: comp.os.msdos.djgpp
From: tob AT world DOT std DOT com (Tom Breton)
Subject: Re: __attribute__((section))
Message-ID: <DvHuo8.2pv@world.std.com>
Reply-To: tob AT world DOT std DOT com
Organization: BREnterprises
References: <838930289 DOT 23607 DOT 0 AT abwillms DOT demon DOT co DOT uk>
Date: Fri, 2 Aug 1996 04:48:07 GMT
Lines: 20
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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.

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.

> Wow... I think I've done something cool! :-)

Indeed.

        Tom

- Raw text -


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