1/**
2 * \file
3 * \brief internal header of libnuma
4 *
5 * This is derived from:
6 *
7 * Linux man pages "numa"
8 * libnuma from http://oss.sgi.com/projects/libnuma/
9 *
10 */
11
12/*
13 * Copyright (c) 2014, ETH Zurich.
14 * All rights reserved.
15 *
16 * This file is distributed under the terms in the attached LICENSE file.
17 * If you do not find this file, copies can be found by writing to:
18 * ETH Zurich D-INFK, CAB F.78, Universitaetstrasse 6, CH-8092 Zurich.
19 * Attn: Systems Group.
20 */
21
22#ifndef NUMA_DEBUG_H_
23#define NUMA_DEBUG_H_
24
25#define NUMA_DEBUG_ENABLED 0
26
27#if NUMA_DEBUG_ENABLED
28#define NUMA_DEBUG_PRINT(x...) debug_printf(x);
29#else
30#define NUMA_DEBUG_PRINT(x...)
31#endif
32
33#define NUMA_DEBUG_INIT(x...)  NUMA_DEBUG_PRINT("[numa  init] " x);
34
35#define NUMA_DEBUG_ALLOC(x...) NUMA_DEBUG_PRINT("[numa alloc] " x);
36
37#define NUMA_ERROR(fmt, ...) \
38                debug_printf("[numa error] " fmt " in %s():", \
39                             __VA_ARGS__, __FUNCTION__);
40#define NUMA_WARNING(fmt, ...) \
41                debug_printf("[numa  warn] " fmt " in %s():", \
42                             __VA_ARGS__, __FUNCTION__);
43
44#endif /* NUMA_DEBUG_H_ */
45