File: bug.h

package info (click to toggle)
trace-cmd 2.6-0.1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,660 kB
  • ctags: 4,276
  • sloc: ansic: 38,878; makefile: 544; python: 538
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 */