简体   繁体   English

std :: thread是否调用pthread_create

[英]Does std::thread call pthread_create

I am using gcc 4.6.1, but will be using other compilers as well. 我正在使用gcc 4.6.1,但也会使用其他编译器。 My question is: Does std::thread call pthread_create? 我的问题是:std :: thread是否调用pthread_create?

The background is, that i want to use a library which overloads pthread_create. 背景是,我想使用重载pthread_create的库。

Thank you 谢谢

std::thread is not required to call any particular underlying thread library. 不需要std::thread来调用任何特定的基础线程库。 Implementations of the standard library are free to use whatever they want, so long as their behavior matches the standard. 只要标准库的行为与标准匹配,它们的实现就可以随意使用它们想要的任何东西。 If a standard library ships with a compiler for a specific platform, that standard library implementation may directly call OS functions. 如果标准库随附用于特定平台的编译器,则该标准库实现可以直接调用OS函数。

Remember: use of the standard library is portable. 请记住:使用标准库是可移植的。 Implementations of it don't have to be. 的实现没有要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM