今天看啥  ›  专栏  ›  Linux内核之旅

可重入、线程安全和异步信号安全

Linux内核之旅  · 公众号  · linux  · 2017-10-01 07:30
    

文章预览

什么是可重入? 关于可重入和不可重入这些概念网上可以找到很多,这里引用一下WiKi中的解释 a computer program or subroutine is called reentrant if it can be interrupted in the middle of its execution, and then be safely called again (“re-entered”) before its previous invocations complete execution. The interruption could be caused by an internal action such as a jump or call, or by an external action such as an interrupt or signal. Once the reentered invocation completes, the previous invocations will resume correct execution. 简单来说是这样的,可重入指的是一个程序或者函数所具备的性质,该性质指的是一个函数在执行的过程中被中断,程序的执行流跑到另外的一个地方把这个函数重新执行了一次,执行完成后返回被中断的地方再次运行之前的函数,而这个 ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览