{"blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","url":"https://iww.hateblo.jp/entry/20120324/atomic","author_url":"https://blog.hatena.ne.jp/iww/","title":"\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30e1\u30e2\u30ea\u30a2\u30af\u30bb\u30b9\u306e\u305f\u3081\u306e\u7d44\u8fbc\u307f\u95a2\u6570","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20120324%2Fatomic\" title=\"\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30e1\u30e2\u30ea\u30a2\u30af\u30bb\u30b9\u306e\u305f\u3081\u306e\u7d44\u8fbc\u307f\u95a2\u6570 - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","blog_url":"https://iww.hateblo.jp/","categories":["Linux","C"],"author_name":"iww","published":"2012-03-24 00:00:01","image_url":null,"version":"1.0","description":"http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html \u6392\u4ed6\u5236\u5fa1\u3092\u304d\u3063\u3061\u308a\u3084\u3063\u3066\u3066\u3082\u3001\u982d\u306e\u4e2d\u3067\u306f\u306a\u3093\u3068\u306a\u304f\u300c\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u304f\u3089\u3044\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u30a2\u30c8\u30df\u30c3\u30af\u3060\u308d\u300d\u3068\u601d\u3063\u3066\u305f\u3051\u3069\u3001\u5b9f\u969b\u306b\u3084\u3063\u305f\u3089\u5168\u7136\u30c0\u30e1\u3060\u3063\u305f\u3002 #include <pthread.h> #include <stdio.h> volatile long long A=0; void *gettidtest( void *arg ) { int number = (int)(long) arg; long long i; printf(\"thread=%d sta\u2026","width":"100%","type":"rich"}