mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-07 04:07:53 +00:00
prog: move MaxPids const to prog
The const may be needed by other packages. E.g. when checking manager config.
This commit is contained in:
parent
3cbc0ac516
commit
e0c1bcbabc
@ -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 {
|
||||
|
@ -235,6 +235,8 @@ type ProcType struct {
|
||||
ValuesPerProc uint64
|
||||
}
|
||||
|
||||
const MaxPids = 32
|
||||
|
||||
func (t *ProcType) Default() uint64 {
|
||||
// Special value denoting 0 for all procs.
|
||||
return 0xffffffffffffffff
|
||||
|
Loading…
x
Reference in New Issue
Block a user