File: debug.h

package info (click to toggle)
hwloc 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,704 kB
  • ctags: 2,792
  • sloc: ansic: 12,508; sh: 10,481; makefile: 818; xml: 334; csh: 138; php: 8
file content (37 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
 * See COPYING in top-level directory.
 */

/* The configuration file */

#ifndef HWLOC_DEBUG_H
#define HWLOC_DEBUG_H

#include <private/config.h>

#ifdef HWLOC_DEBUG
#define hwloc_debug(s, ...) fprintf(stderr, s, ##__VA_ARGS__)
#define hwloc_debug_cpuset(fmt, cpuset) do { \
  char *s= hwloc_cpuset_printf_value(cpuset); \
  fprintf(stderr, fmt, s); \
  free(s); \
} while (0)
#define hwloc_debug_1arg_cpuset(fmt, arg1, cpuset) do { \
  char *s= hwloc_cpuset_printf_value(cpuset); \
  fprintf(stderr, fmt, arg1, s); \
  free(s); \
} while (0)
#define hwloc_debug_2args_cpuset(fmt, arg1, arg2, cpuset) do { \
  char *s= hwloc_cpuset_printf_value(cpuset); \
  fprintf(stderr, fmt, arg1, arg2, s); \
  free(s); \
} while (0)
#else
#define hwloc_debug(s, ...) do { } while(0)
#define hwloc_debug_cpuset(s, cpuset) do { } while(0)
#define hwloc_debug_1arg_cpuset(s, arg1, cpuset) do { } while(0)
#define hwloc_debug_2args_cpuset(s, arg1, arg2, cpuset) do { } while(0)
#endif

#endif /* HWLOC_DEBUG_H */