On Fri, 2 Aug 2013 09:35:23 -0400, Shmuel Metz (Seymour J.) wrote:

> on 08/01/2013  at 06:30 PM, Paul Gilmartin said:
>>...
>Or serializing when it matters. But such code is usually harder to
>maintain.
>
>>Almost as bad as code-modification is the use in C of function
>>pointers in structs.
>
>You mean an object that has methods?
> 
Yes.  Where I've had problems is where an array of struct
containing function pointers is initialized, partly statically
by a pages-long unstructured list of constant expressions;
perhaps modified later by assignment.  One of the functions
generates an error, possibly an assertion failure.

o How did I get here?

o What was the index into the arrayof struct?

o How was the function pointer set?

Things that might help, but weren't done:

o Pass each function a "self" pointer identifying the object.
  This is intrinsic in true OO; must be done electively in C
  simulated OO.

o On modifying a struct used to emulate an object, insert
  values of __FILE__ and __LINE__ into members of  that
  struct.  This could be done routinely with a macro.


>>PSA makes z/OS partly reentrant.
>
>Partly? The use of, e.g., ENQ, latches, locks appears to make it fully
>reentrant.
>
OK.  s/reentrant/sharable/, in the sense that the segment containing
the CMS nucleus be shared among many Virtual Machines.  I believe
nothing similar can be done with the z/OS nucleus.  Perhaps I'm
wrong; can it be done?  Is it actively being done?  Similar questions
about the Linux kernel.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to