Linux下原子性操作,类似Windows下的InterLockedXXX
type __sync_fetch_and_add (type *ptr, type value);
type __sync_fetch_and_sub (type *ptr, type value);
type __sync_fetch_and_or (type *ptr, type value);
type __sync_fetch_and_and (type *ptr, type value);
type __sync_fetch_and_xor (type *ptr, type value);
type __sync_fetch_and_nand (type *ptr, type value);
type __sync_add_and_fetch (type *ptr, type value);
type __sync_sub_and_fetch (type *ptr, type value);
type __sync_or_and_fetch (type *ptr, type value);
type __sync_and_and_fetch (type *ptr, type value);
type __sync_xor_and_fetch (type *ptr, type value);
type __sync_nand_and_fetch (type *ptr, type value);
Linux下原子性操作,类似Windows下的InterLockedXXX
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/70582.html
- 上一篇:winform 自定义控件引用问题
- 下一篇:win7 下安装 vc6 【分享】