<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/inferno-os/">
    <title>Inferno user&#039;s page</title>
    <link>http://w.atwiki.jp/inferno-os/</link>
    <atom:link href="https://w.atwiki.jp/inferno-os/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>Inferno user&#039;s page</description>

    <dc:language>ja</dc:language>
    <dc:date>2008-08-27T10:01:57+09:00</dc:date>
    <utime>1219798917</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/inferno-os/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/inferno-os/pages/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/inferno-os/pages/11.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/inferno-os/pages/22.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/inferno-os/pages/19.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/inferno-os/pages/12.html">
    <title>MENU</title>
    <link>https://w.atwiki.jp/inferno-os/pages/12.html</link>
    <description>
      <![CDATA[<!--@@@@@--><h3 id="id_b7a6c500">メニュー</h3>
<ul><li><a href="http://w.atwiki.jp/inferno-os/pages/11.html"  title="Welcome (6485d)">TOP</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/19.html"  title="MLピックアップ (6486d)">MLピックアップ</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/17.html"  title="デーモソ君のソース探検 (6637d)">デーモソ君のソース探検</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/13.html"  title="参考情報 (6660d)">参考情報</a></li>
<li><a href="http://d.hatena.ne.jp/inferno/"  rel="nofollow">blog</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/14.html"  title="書いてる人 (6641d)">書いてる人</a></li></ul>
<br />
<hr />
<div>
revised: 2008/02/26
<br />
since  : 2003/03/09

</div>
<br />
<div>
<span class="counter 9e07ea604e4c61c31079455254f4b98e" id="9e07ea604e4c61c31079455254f4b98e_1" title="total Welcome" data-pageid="11" data-hash="9e07ea604e4c61c31079455254f4b98e" data-type="total" data-all="false"> - </span>
<br />
<a rel="nofollow" href="http://w.atwiki.jp/inferno-os/pedit/12.html">ここを編集</a>
</div>]]>    </description>
    <dc:date>2008-08-27T10:01:57+09:00</dc:date>
    <utime>1219798917</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/inferno-os/pages/18.html">
    <title>ソース探検/01</title>
    <link>https://w.atwiki.jp/inferno-os/pages/18.html</link>
    <description>
      <![CDATA[<!--@@@@@--><ul><li>先生:<ul><li>「それでは、今日の宿題はpauseコマンドです。Infernoがはじめてのみなさんにも簡単に読めるソースですので、忘れずにやってきてくださいね。」</li></ul></li>
<li>デーモソ君:<ul><li>「は～い！」</li></ul></li></ul>
<div>
どうやら中学校ではじめての宿題となったのはpauseコマンドのようです。デーモソ君は無事に宿題をこなすことができるでしょうか。
<br />
家に帰ったデーモソ君はさっそくノートPCを開きました。

</div>
<ul><li>デーモソ君:<ul><li>「まずはソースがどこにあるかだよね。manページに書いてあるかな？えいっ」</li></ul></li></ul>

<blockquote><!--@@@@@--><div>
; man pause
<br />
SLEEP(1)

</div>
<br />
<div>
NAME

</div>
<pre>    sleep, pause - suspend execution for an interval
</pre>
<br />
<div>
SYNOPSIS

</div>
<pre>    sleep n
</pre>
<br />
<pre>    pause
</pre>
<br />
<div>
DESCRIPTION

</div>
<pre>    Sleep suspends its own execution for n seconds before
    returning.
</pre>
<br />
<pre>    Pause never returns, and is typically used to stop a command
    interpreter reading any more from the standard input.
</pre>
<br />
<div>
SOURCE

</div>
<pre>    /appl/cmd/sleep.b
    /appl/cmd/pause.b
</pre>
<br />
<div>
SEE ALSO

</div>
<pre>    sys-sleep(2)
</pre>
<br />
<pre>                        Inferno Manual
</pre></blockquote>

<br />
<div>
デーモソ君の狙いどおり、SOURCEセクションにソースの場所が書かれていました。デーモソ君はつづけてソースを開きます。

</div>
<br />
<div style=" font-family: 'ＭＳ Ｐゴシック','モナーフォント','IPAモナーフォント','IPA モナ','M+IPAモナ','Mona','mona-gothic-jisx0208.1990-0','sans-serif';line-height:normal; word-wrap: break-word; /* IE 5.5+ */white-space: -moz-pre-wrap; /* Mozilla */    white-space: -pre-wrap;     /* Opera 4-6 */    white-space: -o-pre-wrap;   /* Opera 7 */    white-space: pre-wrap;      /* CSS3 */    word-wrap: break-word;      /* IE 5.5+ */						 " class="plugin_aa">implement Pause;<br />#<br /># init program to do nothing but pause<br />#<br /><br />include &quot;sys.m&quot;;<br />include &quot;draw.m&quot;;<br /><br />Pause: module<br />{<br />	init:	fn(nil: ref Draw-&gt;Context, nil: list of string);<br />};<br /><br />init(nil: ref Draw-&gt;Context, nil: list of string)<br />{<br />	&lt;-chan of int;<br />}<br /></div>
<br />
<ul><li>デーモソ君:<ul><li>「うわっ、見たことない言語で書かれてるよ！えーん、えーん、パパー！」</li></ul></li>
<li>パパ:<ul><li>「どうしたんだ？デソ。」</li></ul></li>
<li>デーモソ君:<ul><li>「Infernoは、C言語じゃないんだ！」</li></ul></li>
<li>パパ:<ul><li>「そりゃそうだ。Cは小学校までだ。これからはLimboだよ。」</li></ul></li>
<li>デーモソ君:<ul><li>「Limbo？」</li></ul></li>
<li>パパ:<ul><li>「そう。Infernoはそれ自体はCで書かれているけど、Inferno上で動くアプリケーションはLimboで書かれてる。分散アプリケーションを書くのに優れた言語だよ。」</li></ul></li>
<li>デーモソ君:<ul><li>「そうなんだ。C言語とはどう違うの？」</li></ul></li>
<li>パパ:<ul><li>「それは簡単には説明できないな。ちゃんとマニュアル<span class="link_atwiki_footnote"><span class="hidden">(</span><a href="#footnote_foot_1" id="footnote_body_1" title="http://www.vitanuova.com/inferno/papers/descent.html">*1</a><span class="hidden">)</span></span>があるんだから読んでごらん。で、宿題は…pauseコマンドか。initがCのmainみたいなものだから、とりあえずそこから読んでみるといい。」</li></ul></li></ul>
<br />
<div>
デーモソ君はあらためてinit関数を見てみました。

</div>
<br />
<div style=" font-family: 'ＭＳ Ｐゴシック','モナーフォント','IPAモナーフォント','IPA モナ','M+IPAモナ','Mona','mona-gothic-jisx0208.1990-0','sans-serif';line-height:normal; word-wrap: break-word; /* IE 5.5+ */white-space: -moz-pre-wrap; /* Mozilla */    white-space: -pre-wrap;     /* Opera 4-6 */    white-space: -o-pre-wrap;   /* Opera 7 */    white-space: pre-wrap;      /* CSS3 */    word-wrap: break-word;      /* IE 5.5+ */						 " class="plugin_aa">init(nil: ref Draw-&gt;Context, nil: list of string)<br />{<br />	&lt;-chan of int;<br />}<br /></div>
<br />
<ul><li>デーモソ君:<ul><li>「ここだけみても、やっぱりよくわからないんだ。どうして「&lt;-chan of int;」だけでプロセスがブロックするの？」</li></ul></li>
<li>パパ:<ul><li>「まず、&quot;&lt;-&quot;はチャネルオペレータだね。Infernoはチャネルという機構でプロセス間通信を実現してるんだよ。Unixでいうパイプやソケットみたいなものだね。でもここでは送信元も送信先も明示していないね。」</li></ul></li>
<li>デーモソ君:<ul><li>「そんな記述ができるんだ。でもこれだけじゃやっぱり何をやっているのかわかんないや。」</li></ul></li>
<li>パパ:<ul><li>「『目に見えるものだけが真実ではない』と偉い人は言ってるだろう。Limboのソースだけでわからなければダンプしてみればいい。」</li></ul></li></ul>
<br />
<div>
そう言ってパパはpause.disをダンプして見せてくれました。

</div>
<br />

<blockquote><!--@@@@@--><div>
; disdump /dis/pause.dis
<br />
newcw     , $0, 44(fp)
<br />
recv      44(fp), 40(fp)
<br />
movp      0(mp), 44(fp)
<br />
ret       
<br />
;

</div></blockquote>

<br />
<ul><li>デーモソ君:<ul><li>「あのソースがたったこれだけなんだ。」</li></ul></li>
<li>パパ:<ul><li>「これはInfernoの仮想マシンの命令だから、命令の意味はDisのマニュアル<span class="link_atwiki_footnote"><span class="hidden">(</span><a href="#footnote_foot_2" id="footnote_body_2" title="Dis Virtual Machine Specification http://www.vitanuova.com/inferno/papers/dis.html">*2</a><span class="hidden">)</span></span>を見てごらん。」</li></ul></li></ul>
<br />
<div>
デーモソ君は各命令の意味を調べました。

</div>
<br />

<blockquote><!--@@@@@--><div>
newcx - Allocate channel

</div>
<br />
<pre>   Syntax:		newcw	dst
   		newcb	dst
   		newcl	dst
   		newcf	dst
   		newcp	dst
   		newcm	src, dst
   		newcmp	src, dst
   Function:	dst = new(Channel)
</pre>
<br />
<div>
The newc instruction allocates a new channel of the specified type and stores a reference to the channel in dst. For the newcm instruction the source specifies the number of bytes of memory used by values sent on the channel (see the movm instruction above). For the newcmp instruction the first operand specifies a type descriptor giving the length of the structure and the location of pointers within the structure (see the movmp instruction above).

</div></blockquote>

<br />

<blockquote><!--@@@@@--><div>
recv - Receive from channel

</div>
<br />
<pre>   Syntax:		recv	src, dst
   Function:	dst = &lt;-src
</pre>
<br />
<div>
The recv instruction receives a value from some other thread on the channel specified by the src operand. Communication is synchronous, so the calling thread will block until a corresponding send or alt is performed on the channel. The type of the received value is determined by the channel type and the dst operand specifies where to place the received value.

</div></blockquote>

<br />

<blockquote><!--@@@@@--><div>
movp - Move pointer

</div>
<br />
<pre>   Syntax:		movp	src, dst
   Function:	destroy(dst)
   		dst = src
   		incref(src)
</pre>
<br />
<div>
The movp instruction copies a pointer adjusting the reference counts to reflect the new pointers.

</div></blockquote>

<br />
<ul><li>デーモソ君:<ul><li>「newcwはチャネルの生成、recvはチャネルからの受信、movpはポインタのコピーだね。」</li></ul></li>
<li>パパ:<ul><li>「それだけ分かれば十分だ。大事なのは、チャネルの受信側はInfernoのスケジューラによって待ち状態にされる。次に実行状態になるのはチャネルから受信があった時、という事だ。」</li></ul></li></ul>
<br />
<div>
パパはInferno上のプロセスの状態遷移図を描いてくれました。
<br />
(TODO:図の挿入）

</div>
<br />
<ul><li>パパ:<ul><li>「でもpauseコマンドの場合は、チャネルの送信側のプロセスもpauseコマンド自身だ。すでに待ち状態になってるプロセスがチャネルへデータの送信なんて出来ない。」</li></ul></li>
<li>デーモソ君:<ul><li>「そうか。pauseコマンドは来るはずのないデータをずっと待ってる状態なんだね。」</li></ul></li>
<li>パパ:<ul><li>「そのとおり。pauseコマンドはチャネルのしくみをうまく利用した例だな。」</li></ul></li>
<li>デーモソ君:<ul><li>「でも先生は簡単に読めるって言ってたのに、ずいぶん難しかったなぁ。」</li></ul></li>
<li>パパ:<ul><li>「読むことと理解することは違うってことさ。」</li></ul></li></ul>]]>    </description>
    <dc:date>2008-08-27T10:00:15+09:00</dc:date>
    <utime>1219798815</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/inferno-os/pages/11.html">
    <title>Welcome</title>
    <link>https://w.atwiki.jp/inferno-os/pages/11.html</link>
    <description>
      <![CDATA[<!--@@@@@--><div>
以前は<a href="http://intrance.hp.infoseek.co.jp/infernopage/top.html"  rel="nofollow">ここ</a>でやってました。

</div>
<br />
<div>
まだまだ作成中。

</div>
<hr />
<div>
■更新予定（優先度順）
<br />
_デーモソ君のソース探検第1話（8月中）
<br />
_MLピックアップ（随時）
<br />
_インストールガイド作成（9月中）
<br />
_Infernoハッキングガイド（そのうち）

</div>
<hr />
<h2 id="id_9bd5cc8e">News</h2>
<h4 id="id_3f9dd016">[2008-02-26] 3月2日にtip9ugの新年会が開催されます。</h4>
<div>
3月にやるセンスがGood。問い合わせは<a href="http://www.tip9ug.jp/jp/"  rel="nofollow">tip9ug</a>へ。

</div>
<h4 id="id_3f3874c0">[2008-02-26] 新装開店</h4>
<div>
<a href="http://intrance.hp.infoseek.co.jp/infernopage/top.html"  rel="nofollow">ここ</a>のアカウントをどうやっても復活できなかったので移動しました。旧サイトはいつか消滅するでしょう。

</div>
<hr />]]>    </description>
    <dc:date>2008-08-27T09:50:13+09:00</dc:date>
    <utime>1219798213</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/inferno-os/pages/22.html">
    <title>ML/vitanuova/200808</title>
    <link>https://w.atwiki.jp/inferno-os/pages/22.html</link>
    <description>
      <![CDATA[<!--@@@@@-->
<div class="plugin_contents"><!--@@@@@--><ul><li><a href="#id_fe7c67a2">1 Aug 18:551 Aug 18:55 How do i install Inferno in a partition?</a></li></ul></div>

<hr />
<h2 id="id_fe7c67a2">1 Aug 18:551 Aug 18:55 How do i install Inferno in a partition?</h2>
<ul><li><a href="http://comments.gmane.org/gmane.os.inferno.general/4074"  rel="nofollow">リンク</a></li></ul>
<div>
「InfernoをPCへネイティブにインストールしたい」という話題。
<br />
Brian L. Stuartから、彼がまとめたインストール手順が紹介されています。

</div>
<ul><li><a href="https://umdrive.memphis.edu/blstuart/htdocs/inf_native.html" rel="nofollow">https://umdrive.memphis.edu/blstuart/htdocs/inf_native.html</a></li>
<li><a href="https://umdrive.memphis.edu/blstuart/htdocs/inf_nat_inst.html" rel="nofollow">https://umdrive.memphis.edu/blstuart/htdocs/inf_nat_inst.html</a></li></ul>
<br />
<br />
<hr />]]>    </description>
    <dc:date>2008-08-26T14:19:24+09:00</dc:date>
    <utime>1219727964</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/inferno-os/pages/19.html">
    <title>MLピックアップ</title>
    <link>https://w.atwiki.jp/inferno-os/pages/19.html</link>
    <description>
      <![CDATA[<!--@@@@@--><div>
Inferno関連のメーリングリストから、目に付いたトピックをここで紹介します。

</div>
<ul><li><a href="http://w.atwiki.jp/inferno-os/pages/22.html"  title="ML/vitanuova/200808 (6486d)">inferno-list@vitanuova.com 2008年8月</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/21.html"  title="ML/vitanuova/200804 (6630d)">inferno-list@vitanuova.com 2008年4月</a></li>
<li><a href="http://w.atwiki.jp/inferno-os/pages/20.html"  title="ML/vitanuova/200803 (6644d)">inferno-list@vitanuova.com 2008年3月</a></li></ul>
<br />
<hr />]]>    </description>
    <dc:date>2008-08-26T14:12:58+09:00</dc:date>
    <utime>1219727578</utime>
  </item>
  </rdf:RDF>
