doc/man: only mention `-llttng-ust-common` in synopses (conditionally)
[lttng-ust.git] / src / common / smp.h
1 /*
2 * SPDX-License-Identifier: LGPL-2.1-only
3 *
4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
7 #ifndef _UST_COMMON_SMP_H
8 #define _UST_COMMON_SMP_H
9
10 /*
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.
13 *
14 * If the sysconf call fails, don't populate the cache and return 0.
15 */
16 int num_possible_cpus(void)
17 __attribute__((visibility("hidden")));
18
19 #define for_each_possible_cpu(cpu) \
20 for ((cpu) = 0; (cpu) < num_possible_cpus(); (cpu)++)
21
22 #endif /* _UST_COMMON_SMP_H */
This page took 0.031167 seconds and 4 git commands to generate.