摘要:
一、POSIX中对可重入和线程安全这两个概念的定义:ReentrantFunction:Afunctionwhoseeffect,whencalledbytwoormorethreads,isguaranteedtobeasifthethreadseachexecutedthe functiononeafteranotherinanundefinedorder,evenif theactualexecutionisinterleaved.Thread-SafeFunction:Afunctionthatmaybesafelyinvokedconcurrentlybymultiplethread 阅读全文