{"provider_name":"Hatena Blog","height":"190","published":"2008-06-12 13:27:00","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Famachang.hatenablog.com%2Fentry%2F20080612%2F1213244820\" title=\" \u6700\u521d\u306e\u4e00\u56de\u3060\u3051\u521d\u671f\u5316\u3057\u305f\u3044\u3068\u304d - IT\u6226\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://amachang.hatenablog.com/","provider_url":"https://hatena.blog","url":"https://amachang.hatenablog.com/entry/20080612/1213244820","version":"1.0","image_url":null,"author_url":"https://blog.hatena.ne.jp/amachang/","categories":["C++"],"width":"100%","description":"\u4e00\u65e5\u4e00\u56de\u30b9\u30ec\u30c3\u30c9\u52c9\u5f37 \u6700\u521d\u306e\u4e00\u56de\u3060\u3051\u521d\u671f\u5316\u3057\u305f\u3044\u3068\u304d \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304f // \u307e\u3063\u305f\u304f\u30bb\u30f3\u30b9\u306e\u306a\u3044\u4f8b\u3067\u3059\u304c #include <stdio.h> #include <pthread.h> // \u3053\u306e p \u3092 static char* p = NULL; static pthread_mutex_t m; void* f(void* _p) { // \u6700\u521d\u306b\u3053\u3053\u3092\u901a\u3063\u305f\u3068\u304d\u3060\u3051\u521d\u671f\u5316\u3057\u305f\u3044 pthread_mutex_lock(&m); if (p == NULL) { char* tmp = (char*)malloc(10); strcpy(tmp, \"hoge\"); p = tmp; } \u2026","blog_title":"IT\u6226\u8a18","author_name":"amachang","type":"rich","title":" \u6700\u521d\u306e\u4e00\u56de\u3060\u3051\u521d\u671f\u5316\u3057\u305f\u3044\u3068\u304d"}