csys: revert: scope in process dict -> explicit param

This commit is contained in:
Helmut Merz 2026-04-29 07:55:46 +02:00
parent fec2a1b42d
commit 850ae6ed7b
2 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -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)