Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!news.larc.nasa.gov!hal.larc.nasa.gov!alan From: alan@hal.larc.nasa.gov (alan dare) Newsgroups: comp.sys.sgi Subject: mpin and function length Message-ID: <1991Jun19.172430.5654@news.larc.nasa.gov> Date: 19 Jun 91 17:24:30 GMT Sender: news@news.larc.nasa.gov (USENET Network News) Organization: NASA Langley Research Center, Hampton, VA USA Lines: 29 Originator: alan@hal.larc.nasa.gov Irix'ers, I have been looking at some of the "REACT" features and the demo program in section 14 volume II of the Iris-4D Programmers Guide. The program pins the signal handler into memory. Seems like a good idea. To find the length of the signal handling function the following is done during pinning: mpin((char *)catcher, (int)pinmem - (int)catcher); In the source code pinmem() is directly after catcher(). Thus, the size of the function is found. I would like to pin my signal handler in memory, but I have some questions about finding the function length. If i'm using O3 optimization or a Power compiler I think the locations of the functions could be changed (Correct ?). The problem could also arise if an engineer after me mods the program and changes the function location. I would like to find another solution to dynamicly determine the function length, but I don't know how. If I am off base here, please tell me what i'm missing. If not, anyone have any good ideas? Thanks -- ********************************************************************* Alan Dare | Internet : alan@hal.larc.nasa.gov NASA Langley Research Center |