<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>eldesh</author_name>
  <author_url>https://blog.hatena.ne.jp/eldesh/</author_url>
  <blog_title>::Eldesh a b = LEFT a | RIGHT b</blog_title>
  <blog_url>https://eldesh.hatenablog.com/</blog_url>
  <categories>
    <anon>C</anon>
    <anon>glibc</anon>
  </categories>
  <description>random_r 関数は glibc が提供しているリエントラントな擬似乱数生成APIです。 複数のスレッドで乱数を使いたい場合はこれを使うべきらしい。*1 複数のスレッドが random() を使うような状況では、この関数を使用すべきではない。 その場合には random_r(3) を使うこと。 http://linuxjm.sourceforge.jp/html/LDP_man-pages/man3/random.3.html ただ少なくともこのマニュアルが不十分で、man を読んだだけだと正しく使うことは出来ません。 以下に私の手元で 動いたように見える コードを示します。 /* * $…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Feldesh.hatenablog.com%2Fentry%2F20150403%2F1428052619&quot; title=&quot; random_rは使ってはいけない - ::Eldesh a b = LEFT a | RIGHT b&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>2015-04-03 18:16:59</published>
  <title> random_rは使ってはいけない</title>
  <type>rich</type>
  <url>https://eldesh.hatenablog.com/entry/20150403/1428052619</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
