Hide internal tracepoint and providers data symbols
[lttng-ust.git] / src / common / smp.h
CommitLineData
74cc1f59
MJ
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 */
16int num_possible_cpus(void);
17
18#define for_each_possible_cpu(cpu) \
19 for ((cpu) = 0; (cpu) < num_possible_cpus(); (cpu)++)
20
21#endif /* _UST_COMMON_SMP_H */
This page took 0.022686 seconds and 4 git commands to generate.