• Subject: Register call stack entry termination procedure for priorinvocation level?
  • From: David Morris <dmorris@xxxxxxxxxxxxx>
  • Date: Tue, 14 Apr 1998 11:50:55 -0600

RPG Fans,

Is there a way to specify a prior invocation level with the register call stack 
entry user exit API?  We have not had much use for this API because our cleanup 
must in many cases be initiated by the calling procedure.   We could register 
the cleanup procedure in the caller but that requires just as much work as 
calling the cleanup directly on return.  One option would be to always register 
a common cleanup procedure that is passed and stores a static pointer to the 
real cleanup procedures along with an invocation level.  This would add a lot 
of overhead (to check the stack level at each return).  Anyone have a good way 
to do this?  This would be used in sub-procedures that dynamically allocate 
storage and would remove the requirement that a cleanup sub-procedure be called 
after the real work is complete.  This would be for normal exit.

Thanks,

David Morris
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
           
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.