cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/06/21:35:13

From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Locking in C++.
Date: 6 Oct 1997 23:04:48 GMT
Organization: Netcom
Lines: 28
Message-ID: <61bqqg$q1r@dfw-ixnews12.ix.netcom.com>
References: <3 DOT 0 DOT 16 DOT 19971003194523 DOT 2bf769ac AT hem1 DOT passagen DOT se>
NNTP-Posting-Host: elp-tx1-09.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Palotas <blizzar AT hem1 DOT passagen DOT se> wrote:
> I wonder if there is some way to lock a memberfunction of a class in DJGPP.
> I know an ordinary function can (strangely enough), as it seems, be locked
> by creating a dummy function right after the function you want to lock. But
> does this work for a member-function of a class too? (I somehow doubt that).

> Isn't there any other way to find out the size of a function? Or can you
> put a member function of a class in a specific code-segment and then lock
> the entire segment? (Maybe one can lock an entire class in one step?)... 

I haven't tried it, but I'm rather unsure that the tradition dummy function
trick would work.

Your only alternative, I believe, is to patch gcc to support sections as an
__attribute__, put everything you need to lock in a single section, and lock
the whole thing.

Patches (including a pre-recompiled :) binary) and instructions for using and
locking sections can be found at Alaric B. William's web site:

http://www.abwillms.demon.co.uk/prog/index.htm

HTH!

-- 
[- 				 firewind	                            -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[- 	    "You're just jealous because the voices talk to -me-."          -]

- Raw text -


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