摘要: Document Object Model文檔對象模型
一個函數(shù)是reentrant的,如果它可以被安全地遞歸或并行調(diào)用。要想成為reentrant式的函數(shù),該函數(shù)不能含有(或使用)靜態(tài)(或全局)數(shù)據(jù) (來存儲函數(shù)調(diào)用過程中的狀態(tài)信息),也不能返回指向靜態(tài)數(shù)據(jù)的指針,它只能使用由調(diào)用者提供的數(shù)據(jù),當然也不能調(diào)用non-reentrant函數(shù).
比較典型的non-reentrant函數(shù)有g(shù)etpwnam, strtok, malloc等.
閱讀全文