diff --git a/lib/csys/csys.ex b/lib/csys/csys.ex index d59c9b4..4ecbcce 100644 --- a/lib/csys/csys.ex +++ b/lib/csys/csys.ex @@ -19,8 +19,8 @@ defmodule Scopes.CSys do # helper functions defp process(msg, scope) do - Process.put(:scope, scope) - proc(scope).(msg) + #Process.put(:scope, scope) + proc(scope).(msg, scope) end def state(scope), do: elem(scope, 0) diff --git a/lib/csys/program.ex b/lib/csys/program.ex index 9d012ce..0f1d75c 100644 --- a/lib/csys/program.ex +++ b/lib/csys/program.ex @@ -9,7 +9,7 @@ defmodule Scopes.CSys.Program do # programs def basic_prog() do - %{default: &std_proc/1 + %{default: &std_proc/2 #initial: &std_proc/1, #active: &std_proc/1, #retired: &std_proc/1 @@ -18,8 +18,8 @@ defmodule Scopes.CSys.Program do # processors - def std_proc(msg) do - scope = Process.get(:scope) + def std_proc(msg, scope) do + #scope = Process.get(:scope) case msg do {:parent} -> new = create_parent(scope)