In article <4b8389b7.9030...@gmail.com> you wrote:
> Charles Mills wrote:
> >
> > The fundamental problem I guess is that any solution that keeps a pointer
> > around "somewhere in the code" is fundamentally not reentrant, unless I can
> > figure out how to utilize pseudo-registers. I've heard the term
> > pseudo-register for years but I have never delved into them. Perhaps now is
> > the time.
> >
> >   

> You're fundamentally not reentrant if you use any kind of global data. 
> That may be name/tokens, control
> block anchors or WSA. That may not be a problem for you if you only want 
> one instance of the routine.
> I prefer to design C++ applications to use objects which can handle 
> multiple instantiations of the same
> class even if I only need one instance. You never know when that 
> requirement may change.

The purpose of WSA is to provide reentrancy. Every copy of the program
will get it's own WSA initialised when the program starts. No different
than in assembler where you do a GETMAIN and use MF=L macros.

> > RELATED: is anyone using void *__malloc24(size_t size);? If you code it then
> > it does not compile; if you code your own declaration then it does not link.
> > At least not in my code. Yes, I included <stdlib.h>. Obviously, not a big
> > deal to write an assembler GETMAIN routine, but still ...
> >
> > Charles

-- 
Don Poitras - SAS Development  -  SAS Institute Inc. - SAS Campus Drive
sas...@sas.com           (919) 531-5637                Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to