File: bug.h

package info (click to toggle)
trace-cmd 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,348 kB
  • ctags: 3,723
  • sloc: ansic: 33,860; makefile: 530; python: 524
file content (14 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef __TRACE_CMD_BUG
#define __TRACE_CMD_BUG

#define unlikely(cond)	__builtin_expect(!!(cond), 0)

#define WARN_ONCE(cond, fmt, ...)			\
	({						\
		int __c__ = cond;			\
		if (unlikely(__c__)) {			\
			warning(fmt, ##__VA_ARGS__);	\
		}					\
		__c__;					\
	})
#endif /* __TRACE_CMD_BUG */