diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-07-25 10:38:58 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-07-25 10:39:29 +0200 |
| commit | e0c1bcbabc5e9037b9a265204dc70c5188909dbc (patch) | |
| tree | 6f67e4e8d64a81e38ad8da0827123c6a59a58391 /pkg | |
| parent | 3cbc0ac5160e15cff5dde428da769b93bf0a5d85 (diff) | |
prog: move MaxPids const to prog
The const may be needed by other packages.
E.g. when checking manager config.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/compiler/types.go | 5 |
1 files changed, 2 insertions, 3 deletions
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 { |
