开发者

pthread_cleanup_pop_restore - what is it?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜