-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathdtracker.H
More file actions
34 lines (29 loc) · 772 Bytes
/
dtracker.H
File metadata and controls
34 lines (29 loc) · 772 Bytes
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
#ifndef __DTRACKER_H__
#define __DTRACKER_H__
/**** generic macros and definitions ******************************/
#define BOOL(x) ((x) ? 1 : 0)
extern std::ofstream read_offset;
extern bool mmap_type;
/* min/max macros for general use */
#if !defined(MIN)
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#if !defined(MAX)
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
/* compiler directives for branch prediction */
#if !defined(likely)
#define likely(x) __builtin_expect((x), 1)
#endif
#if !defined(unlikely)
#define unlikely(x) __builtin_expect((x), 0)
#endif
/**** debugging macros and inlines ********************************/
#ifdef NO_PINTOOL_LOG
#ifdef LOG
#undef LOG
#endif
#define LOG(args...) do{} while(0)
#endif
#endif
/* vim: set noet ts=4 sts=4 sw=4 ai : */