大概有test and set硬件指令和关中断,锁内存总线等同步机制
参考链接
http://blog.sina.com.cn/s/blog_75f0b54d0100r7af.html
https://en.wikipedia.org/wiki/Test-and-set
http://faculty.salina.k-state.edu/tim/ossg/IPC_sync/ts.html
http://www.moserware.com/2008/09/how-do-locks-lock.html
https://software.intel.com/en-us/node/544402
http://book.51cto.com/art/201205/337730.htm