Reentrant means that it works correctly when multiple tasks are using it 
concurrently. Refreshable means that it works correctly even if the OS replaces 
it with a clean copy.

As an example of a routine that is reentrant but not refreshable, consider a 
routine that contains a data area and serializes access with CS or CDS. It will 
work correctly when invoked in parallel from multiple tasks, but refreshing the 
module would clear the count.

As an example of a routine that is refreshable but not reentrant, consider a 
routine that updates CVTUSER without serializing it in any way.

However, 99% of the time a routine intended to be reentrant will not only be 
refreshable but will run correctly from read-only storage, while routines 
intended to be refreshable will also be reentrant. I believe that IBM has fixed 
all the legacy self-modifying reentrant code from OS/360.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Rob 
Schramm [rob.schr...@gmail.com]
Sent: Wednesday, February 15, 2023 5:34 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Are JNI required to be re-entrant and/or re-usable?

Ok.. so I am not sure I ever asked this question... What is the real
difference between reentrant and refreshable .. as in an example?  It is
not clear what the distinction actually is.

Rob

On Wed, Feb 15, 2023, 16:34 Attila Fogarasi <fogar...@gmail.com> wrote:

> IBM documents this crisply at
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dmodules-module-reusability&data=05%7C01%7Csmetz3%40gmu.edu%7C5e072c5fa10b4bad441b08db0fa4efef%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638120973304572606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FbfDzXWjN%2BhRrq7gYp5Zjfyb3A00LrinApK3u%2BKHU4U%3D&reserved=0
> Bottom line is that there are only 3 variants:  serially reusable,
> reentrant and refreshable.
> Non-serially reusable is reentrant, but that term isn't used in Binder or
> z/OS doc (thankfully).
>
> On Thu, Feb 16, 2023 at 8:07 AM Phil Smith III <li...@akphs.com> wrote:
>
> > I feel stoopid[er than usual]: I don't understand the difference between
> > "serially reusable" vs. "reusable" vs. "reentrant" in this context. I
> know
> > what the first and last one are, but it seems like the middle one should
> be
> > the same as one of the others.
> >
> >
> >
> > Unless the difference between the latter two is that "reusable" means
> "one
> > user running a shared copy at a time without reloading" and "reentrant"
> > means "multiple users running the same copy at the same time"? Peter?
> >
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to