<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>amachang</author_name>
  <author_url>https://blog.hatena.ne.jp/amachang/</author_url>
  <blog_title>IT戦記</blog_title>
  <blog_url>https://amachang.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>一日一回スレッド勉強 最初の一回だけ初期化したいとき 以下のように書く // まったくセンスのない例ですが #include &lt;stdio.h&gt; #include &lt;pthread.h&gt; // この p を static char* p = NULL; static pthread_mutex_t m; void* f(void* _p) { // 最初にここを通ったときだけ初期化したい pthread_mutex_lock(&amp;m); if (p == NULL) { char* tmp = (char*)malloc(10); strcpy(tmp, &quot;hoge&quot;); p = tmp; } …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Famachang.hatenablog.com%2Fentry%2F20080612%2F1213244820&quot; title=&quot; 最初の一回だけ初期化したいとき - IT戦記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-06-12 13:27:00</published>
  <title> 最初の一回だけ初期化したいとき</title>
  <type>rich</type>
  <url>https://amachang.hatenablog.com/entry/20080612/1213244820</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
