github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/freebsd/cpuset.txt (about)

     1  # Copyright 2020 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <sys/param.h>
     5  include <sys/cpuset.h>
     6  include <sys/domainset.h>
     7  
     8  define CPU_SETSIZE	CPU_MAXSIZE / 64
     9  define DOMAIN_SETSIZE	DOMAINSET_MAXSIZE / 64
    10  
    11  resource cpuset[int32]
    12  
    13  cpuset(setid ptr[out, cpuset])
    14  cpuset_setid(which flags[cpuset_which], id int64, setid cpuset)
    15  cpuset_getid(level flags[cpuset_level], which flags[cpuset_which], id int64, setid ptr[out, cpuset])
    16  
    17  cpuset_getaffinity(level flags[cpuset_level], which flags[cpuset_which], id int64, size bytesize[mask], mask ptr[out, cpuset_mask])
    18  cpuset_setaffinity(level flags[cpuset_level], which flags[cpuset_which], id int64, size bytesize[mask], mask ptr[in, cpuset_mask])
    19  
    20  cpuset_getdomain(level flags[cpuset_level], which flags[cpuset_which], id int64, size bytesize[mask], mask ptr[out, domainset_mask], policy ptr[out, flags[domainset_policy, int32]])
    21  cpuset_setdomain(level flags[cpuset_level], which flags[cpuset_which], id int64, size bytesize[mask], mask ptr[in, domainset_mask], policy flags[domainset_policy])
    22  
    23  cpuset_level = CPU_LEVEL_ROOT, CPU_LEVEL_CPUSET, CPU_LEVEL_WHICH
    24  cpuset_which = CPU_WHICH_TID, CPU_WHICH_PID, CPU_WHICH_JAIL, CPU_WHICH_CPUSET, CPU_WHICH_IRQ, CPU_WHICH_INTRHANDLER, CPU_WHICH_ITHREAD, CPU_WHICH_DOMAIN
    25  domainset_policy = DOMAINSET_POLICY_ROUNDROBIN, DOMAINSET_POLICY_FIRSTTOUCH, DOMAINSET_POLICY_PREFER
    26  
    27  cpuset_mask {
    28  	mask	array[int64, CPU_SETSIZE]
    29  }
    30  
    31  domainset_mask {
    32  	mask	array[int64, DOMAIN_SETSIZE]
    33  }