开发者

Do I need to do anything special to use NPTL (as opposed to pthreads)?

开发者 https://www.devze.com 2023-02-19 11:56 出处:网络
D开发者_StackOverflow社区o I need to do anything special to use NPTL instead of pthreads? I am on kernel 2.3.23...

D开发者_StackOverflow社区o I need to do anything special to use NPTL instead of pthreads? I am on kernel 2.3.23...

I am asking because I am looking at some code which is presumably working with NPTL but I can see that it still includes pthreads, which AFAIK has problems like signal handling at thread level, spurious wake-ups, etc.


No.

NPTL is a newer implementation of POSIX threads, which is used on any reasonably modern Linux distribution.

The older implementation -- LinuxThreads -- was boken in many ways, and you are unlikely to ever encounter it.

Both implementations are pthreads.


The threading implementation is chosen at configure time of the c runtime library, typically glibc (see the example for --enable-add-ons).

0

精彩评论

暂无评论...
验证码 换一张
取 消