开发者

pthread_cleanup_pop_restore - what is it?

开发者 https://www.devze.com 2022-12-23 02:35 出处:网络
pthread_cleanup_pop_restore - what is it? It is from glibc. And it is called too often and eats a lot o开发者_如何学Cf cpu time.

pthread_cleanup_pop_restore - what is it?

It is from glibc. And it is called too often and eats a lot o开发者_如何学Cf cpu time.

The program uses a lot of getc() calls. I can't change the program (it is the benchmark with fixed source), but want to make it run faster.


It is a function!

which in turn, will deregister cleanup function from pthread_cancel's cleanup queue. When glibc io function (with file locking enabled in glibc) will be interrupted by pthread_cancel, it will have a only chance of unlocking file descriptor. This chance is the this function counterpart.

0

精彩评论

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