From e0c1bcbabc5e9037b9a265204dc70c5188909dbc Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 25 Jul 2018 10:38:58 +0200 Subject: prog: move MaxPids const to prog The const may be needed by other packages. E.g. when checking manager config. --- pkg/compiler/types.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go index 293496a9c..96282a52a 100644 --- a/pkg/compiler/types.go +++ b/pkg/compiler/types.go @@ -371,12 +371,11 @@ var typeProc = &typeDesc{ if size == 64 { max = ^uint64(0) } - const maxPids = 32 // executor knows about this constant (MAX_PIDS) if start >= max { comp.error(args[0].Pos, "values starting from %v overflow base type", start) - } else if perProc > (max-start)/maxPids { + } else if perProc > (max-start)/prog.MaxPids { comp.error(args[0].Pos, "values starting from %v with step %v overflow base type for %v procs", - start, perProc, maxPids) + start, perProc, prog.MaxPids) } }, Gen: func(comp *compiler, t *ast.Type, args []*ast.Type, base prog.IntTypeCommon) prog.Type { -- cgit mrf-deployment