# HG changeset patch # User mir3636 # Date 1523610172 -32400 # Node ID 7880e4a8895b7b872f0de6cc67bd9cdd98535a71 # Parent 78bb89fd9cea058ed591f1a18e4c9f2ac2a7e503 add src diff -r 78bb89fd9cea -r 7880e4a8895b Paper/parGotoCreateTask.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/parGotoCreateTask.cbc Fri Apr 13 18:02:52 2018 +0900 @@ -0,0 +1,4 @@ +__code code1(Integer *integer1, Integer * integer2, Integer *output) { + par goto add(integer1, integer2, output, __exit); + goto code2(); +} diff -r 78bb89fd9cea -r 7880e4a8895b Paper/sigos.tex --- a/Paper/sigos.tex Fri Apr 13 17:56:44 2018 +0900 +++ b/Paper/sigos.tex Fri Apr 13 18:02:52 2018 +0900 @@ -410,7 +410,8 @@ %\section{依存関係の解決} \section{並列構文} -Gears OS の並列構文は par goto文で用意されている。 +Gears OS の並列構文は par goto文で用意されている(Code\ref{pargoto})。 +\lstinputlisting[caption=par goto による並列実行, label=pargoto]{./src/parGotoCreateTask.cbc} par goto の引数には Input/Output Data Gear と 実行後に継続する \_\_exit を渡す。 par goto で生成された Task は \_\_exit に継続することで終了する。 par goto文でも 通常の goto 分と同様にメタへの goto 文へ置き換えられるが、par goto 文では通常の goto 文とは異なるメタへと継続する。