BUS_GET_CPUS (9)
Leading comments
Copyright (c) 2016 John H. Baldwin <jhb@FreeBSD.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the doc...
NAME
BUS_GET_CPUS bus_get_cpus - request a set of device-specific CPUsSYNOPSIS
In sys/param.h In sys/bus.h In sys/cpuset.h Ft int Fo BUS_GET_CPUS Fa device_t dev device_t child enum cpu_sets op size_t setsize Fa cpuset_t *cpuset Fc Ft int Fo bus_get_cpus Fa device_t dev enum cpu_sets op size_t setsize cpuset_t *cpuset FcDESCRIPTION
The Fn BUS_GET_CPUS method queries the parent bus device for a set of device-specific CPUs. The Fa op argument specifies which set of CPUs to retrieve. If successful, the requested set of CPUs are returned in Fa cpuset . The Fa setsize argument specifies the size in bytes of the set passed in Fa cpuset .Fn BUS_GET_CPUS supports querying different types of CPU sets via the Fa op argument. Not all set types are supported for every device. If a set type is not supported, Fn BUS_GET_CPUS fails with Er EINVAL . These set types are supported:
- LOCAL_CPUS
- The set of CPUs that are local to the device. If a device is closer to a specific memory domain in a non-uniform memory architecture system (NUMA) this will return the set of CPUs in that memory domain.
- INTR_CPUS
- The preferred set of CPUs that this device should use for device interrupts. This set type must be supported by all bus drivers.
The Fn bus_get_cpus function is a simple wrapper around Fn BUS_GET_CPUS .