Newsgroups: comp.sys.transputer
From: ashdown@mpr.ca (Scott Ashdown)
Subject: Calling functions in another address space - RESOLVED
Organization: MPR Teltech Ltd., Burnaby, B.C., Canada
Date: Fri, 7 Oct 1994 20:51:32 GMT
Message-ID: <1994Oct7.205132.16667@mprgate.mpr.ca>

I've got my stuff working, so I thought I'd post and explain what I
did wrong.

In two words: stack checking. I had this option (-KS) for icc turned on 
in my makefile (and hence never thought about it). It would appear that 
this prevents calls to another configured process' functions from working 
correctly 99% of the time (if things are set up just right, it *can* 
still work, which is why it took so long to figure out what was wrong).

I've also had success using the code that Roger Butenuth kindly posted
to the group earlier this week. It can be used to retrieve the GSB for
a configured process (identical for all its children). It can then be 
passed into the called function and written over the caller's GSB, 
allowing global vars to be accessed. (Breaking more and more rules by
the minute... :)

Thanks for all who responded. As I'm over 3000km away from my 
documentation, it's doubtful I could've done it on my own.



-- 
Scott Ashdown
Engineer, MPR Teltech Ltd.
Burnaby, British Columbia, Canada.
ashdown@mprgate.mpr.ca

