Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Pro*C reentrant?
Steve Holdoway wrote:
>
> On 13 Jan 1997 05:17:17 GMT, damon_at_werple.net.au (Damon Groenveld)
> wrote:
>
> >Hi,
> >
> >Since we are going to be using DCE soon I need to know if there is a version
> >of Pro*C that is thread safe (reentrant). If you have any information that
> >could help me please let me know via email at:
> >
> >damon_at_werple.net.au
>
> I would have thought that, as Pro*C is purely a preprocessor, that
> it's the C compiler that you are using that matters!
>
> Steve
This could be a concern, even with a pre-processor, as the Pro*C generates code to call C-functions, such as (I'm supposing) the OCI calls. Therefore, for the C/Pro*C combination to be reentrant, the written and generated C functions =and= the OCI calls would have to be reentrant.
If, for example, the generated function calls re-use internal static memory, then the generated Pro*C program would not be re-entrant. A second call would stomp on a previous call.
OCI calls, from what I can see, probably qualify. Almost all data used is passed in blocks of user-held memory (such as the Cursor Data Area (CDA)).
However, the preprocessor would have to use them right. The pre-processed C file could still have its own generated static internal memory that is used in the OCI calls, still failing re-entrancy.
There may be more to re-entrancy than this, but this is my understanding.
Bottom line, I don't know how reentrant Pro*C is: but, I =do= know it's more complex than simply having the right C compiler!
:-)
A. Received on Tue Jan 14 1997 - 00:00:00 CST
![]() |
![]() |