Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    44bd271f
    percpu: introduce dynamic_percpu<> · 44bd271f
    Avi Kivity authored
    dynamic_percpu<T> allocates and initializes an object of type T on all cpus
    (if a cpu is later hotplugged, it will also get an instance).  Unlike ordinary
    percpu variables, dynamic_percpu objects can be used in a dynamic scope, that
    is, in objects that are not in static scope (one the stack or heap).
    44bd271f
    History
    percpu: introduce dynamic_percpu<>
    Avi Kivity authored
    dynamic_percpu<T> allocates and initializes an object of type T on all cpus
    (if a cpu is later hotplugged, it will also get an instance).  Unlike ordinary
    percpu variables, dynamic_percpu objects can be used in a dynamic scope, that
    is, in objects that are not in static scope (one the stack or heap).