changeset 51:7880e4a8895b

add src
author mir3636
date Fri, 13 Apr 2018 18:02:52 +0900
parents 78bb89fd9cea
children 4d5bd76a70df
files Paper/parGotoCreateTask.cbc Paper/sigos.tex
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /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();
+}
--- 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 文とは異なるメタへと継続する。