Edit: Both the reentrant version (gethostbyname_r) and non-reentrant one (gethostbyname) are affected (the non-reentrant one uses a fixed buffer length).
non-reentrant
How to use non-reentrant in a sentence. Live example sentences for non-reentrant pulled from indexed public discussions.
Editorial note
Edit: Both the reentrant version (gethostbyname_r) and non-reentrant one (gethostbyname) are affected (the non-reentrant one uses a fixed buffer length).
Quick take
Edit: Both the reentrant version (gethostbyname_r) and non-reentrant one (gethostbyname) are affected (the non-reentrant one uses a fixed buffer length).
Example sentences
So a typical example would have a non-reentrant function altering a variable like global_int as part of its computation.
It's like calling non-reentrant strtok, some of this stuff just doesn't exactly fit into todays world.
A conformant implementation can make a non-reentrant function actually safe under the hood for people that call into it erroneously.
Compilers have been good at hiding those changes from us, but the non-reentrant nature will cause you issues even without threads.
If the library has non-reentrant code, then you can't have more than one thread for the stage -- you can't parallelize it.
So a non-reentrant function is a function that may not be invoked again between a previous invocation and returning from that invocation.
It is a very large library that actually includes a virtual machine that has been rewritten from pascal to single-threaded non-reentrant C to reentrant C...
In the era that most of that code was originally architected, it was also normal to write C programs with all globals, non-reentrant, and non-thread-safe.
No errno (which requires weird and inefficient TLS bullshit), no hooks like atfork/atexit/etc., no locales, no silly non-reentrant functions using global variables, no dlopen/dlclose.
Actually, a non-reentrant function can be thread-safe.
A non-reentrant function cannot be thread safe.
Quote examples
Old "malloc" implementations were usually non-reentrant because they used global variables for managing the heap.
An implementation of "malloc" may be reentrant or it may be non-reentrant.
But I'd rather be able to use "par" at the highest level of my program, and parallelize anything from XML parsing to physics simulation, without worrying that some library call ten functions down the stack will turn out to be non-reentrant.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use non-reentrant in a sentence?
Edit: Both the reentrant version (gethostbyname_r) and non-reentrant one (gethostbyname) are affected (the non-reentrant one uses a fixed buffer length).