projects
/
platform
/
upstream
/
libva-intel-driver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f84db0d
)
Add WARN_ONCE() helper macro.
author
Gwenole Beauchesne
<gwenole.beauchesne@intel.com>
Sun, 18 Mar 2012 07:59:46 +0000
(08:59 +0100)
committer
Xiang, Haihao
<haihao.xiang@intel.com>
Thu, 29 Mar 2012 08:21:32 +0000
(16:21 +0800)
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit
2447c981a84cd9dc1eddf8e4258cef555503024f
)
src/intel_driver.h
patch
|
blob
|
history
diff --git
a/src/intel_driver.h
b/src/intel_driver.h
index
c544250
..
c79f983
100644
(file)
--- a/
src/intel_driver.h
+++ b/
src/intel_driver.h
@@
-94,6
+94,14
@@
struct intel_batchbuffer;
RESTORE_BLOCKED_SIGSET(); \
} while (0)
+#define WARN_ONCE(...) do { \
+ static int g_once = 1; \
+ if (g_once) { \
+ g_once = 0; \
+ printf("WARNING: " __VA_ARGS__); \
+ } \
+ } while (0)
+
struct intel_driver_data
{
int fd;