不可重入的函数不能由多个线程使用。
出于以下任意某个原因,其余函数是不可重入的。
The rest of the functions are non-reentrant because of any of the following.
假定信号处理器使用了不可重入的gethostbyname。
Suppose that the signal handler USES gethostbyname, which is non-reentrant.
如果使用第三方程序库,事情会变得更为复杂,因为您永远不知道哪部分程序库是可重入的,哪部分是不可重入的。
Things become even more complicated when you're using a third-party library, because you never know which parts of the library are reentrant and which are not.
整个程序可以自由的使用静态变量和不可重入的函数,极大的简化了编程和调试,从而增加了性能。
The entire application is free to use all the static variables and non-reentrant library functions it wants, greatly simplifying programming and debugging while increasing performance.
如果某个函数使用并修改了您提供的某个对象,那它可能就是不可重入的;如果两个调用使用同一对象,那么它们会相互干扰。
If a function USES and modifies an object that you supply, it is potentially non-reentrant; two calls can interfere if they use the same object.
由于信号在本质上是异步的,所以难以找出当信号处理函数触发某个不可重入函数时导致的bug。
Due to the asynchronous nature of signals, it is difficult to point out the bug caused when a signal-handling function triggers a non-reentrant function.
记忆数据的状态会使函数不可重入。
Remembering the state of the data makes the function non-reentrant.
对标准程序库而言,有很多程序库函数在固定的对象中返回值,总是重复使用同一对象,这就使得那些函数不可重入。
As with the standard library, there can be many library functions that return values in fixed objects, always reusing the same objects, which causes the functions to be non-reentrant.
如果底层的函数处于关键部分,并且生成并处理信号,那么这可能会导致函数不可重入。
If the underlying function is in the middle of a critical section and a signal is generated and handled, this can cause the function to be non-reentrant.
本文描述了在并行和并发程序设计中函数的不可重入性导致的一些潜在问题。
This article describes some potential problems due to non-reentrancy of the function in parallel and concurrent programming.
在早期的编程中,不可重入性对程序员并不构成威胁;函数不会有并发访问,也没有中断。
In the early days of programming, non-reentrancy was not a threat to programmers; functions did not have concurrent access and there were no interrupts.
返回指向静态数据的指针可能会导致函数不可重入。
Returning a pointer to static data may cause a function to be non-reentrant.
给出了示例,以说明不可重入性所导致的问题。
给出了示例,以说明不可重入性所导致的问题。
应用推荐