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)
17 __attribute__((visibility("hidden")));
19 #define for_each_possible_cpu(cpu) \
20 for ((cpu) = 0; (cpu) < num_possible_cpus(); (cpu)++)
22 #endif /* _UST_COMMON_SMP_H */
This page took 0.031167 seconds and 4 git commands to generate.