Futex based locking mechanism
问题 Somebody can tell me an example of using locking mechanism based on futex? (for muticore x86 CPU, CentOS) 回答1: Pthreads' mutexes are implemented using futexes on recent versions of Linux. Pthreads is the standard C threading API on Linux, and is part of the Posix standard, so you can easily port your program to other Unix-like systems. You should avoid using futexes directly unless you have very unusual needs, because they're very hard to use correctly - use pthreads, or a higher-level,