什么是PTHREAD_MUTEX_ADAPTIVE_NP [英] What is PTHREAD_MUTEX_ADAPTIVE_NP
问题描述
在哪里可以找到自适应" pthread互斥体的文档?符号PTHREAD_MUTEX_ADAPTIVE_NP是在我的系统上定义的,但是仅文档我可以在网上找到有关什么内容的信息.自适应互斥锁是或适合使用的互斥锁.
Where can I find documentation for "adaptive" pthread mutexes? The symbol PTHREAD_MUTEX_ADAPTIVE_NP is defined on my system, but the only documentation I can find online says nothing about what an adaptive mutex is, or when it's appropriate to use.
那...是什么,什么时候应该使用?
So... what is it, and when should I use it?
作为参考,我的libc版本是:
For reference, my version of libc is:
GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu10.5) stable release version 2.15, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.50 system on 2013-09-30.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
和"uname -a"给出
and "uname -a" gives
Linux desktop 3.2.0-55-generic #85-Ubuntu SMP Wed Oct 2 12:29:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
推荐答案
在这里.在我读到它时,它是一个残酷的简单互斥,除了使无争用情况快速运行之外,它什么都不关心.
Here you go. As I read it, it's a brutally simple mutex that doesn't care about anything except making the no-contention case run fast.
这篇关于什么是PTHREAD_MUTEX_ADAPTIVE_NP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!