1 #ifndef _LIBRINGBUFFER_SMP_H
2 #define _LIBRINGBUFFER_SMP_H
7 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; only
12 * version 2.1 of the License.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 * 4kB of per-cpu data available. Enough to hold the control structures,
28 * but not ring buffers.
30 #define PER_CPU_MEM_SIZE 4096
32 extern int __num_possible_cpus
;
33 extern void _get_num_possible_cpus(void);
36 int num_possible_cpus(void)
38 if (!__num_possible_cpus
)
39 _get_num_possible_cpus();
40 return __num_possible_cpus
;
43 #define for_each_possible_cpu(cpu) \
44 for ((cpu) = 0; (cpu) < num_possible_cpus(); (cpu)++)
46 #endif /* _LIBRINGBUFFER_SMP_H */
This page took 0.029295 seconds and 4 git commands to generate.