What does _r suffix mean?

孤人 提交于 2019-12-10 14:25:31

问题


I know _r suffix is used to indicate something thread-safe. For example strtok and strtok_r or libmysql.so and libmysql_r.so. But I cannot find anywhere what this actually means ? For example, _t means 'type' and what does _r suffix mean?


回答1:


See Chapter A.4.16 Thread-Safety in http://pubs.opengroup.org/onlinepubs/000095399/xrat/xbd_chap04.html:

The suffix "_r" is historical, where the 'r' stood for "reentrant".




回答2:


The _r suffix stands for reentrant.




回答3:


_r means reentrant, even though those functions may not be really reentrant. Those functions just guarantee not to use static storage.



来源:https://stackoverflow.com/questions/13103410/what-does-r-suffix-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!