563fe623591d46821664dcd6cb3750d421f85188
2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 #ifndef _UST_COMMON_SMP_H
8 #define _UST_COMMON_SMP_H
11 * Returns the total number of CPUs in the system. If the cache is not yet
12 * initialized, get the value from the system through sysconf and cache it.
14 * If the sysconf call fails, don't populate the cache and return 0.
16 int num_possible_cpus(void);
18 #define for_each_possible_cpu(cpu) \
19 for ((cpu) = 0; (cpu) < num_possible_cpus(); (cpu)++)
21 #endif /* _UST_COMMON_SMP_H */
This page took 0.068203 seconds and 4 git commands to generate.