> Example: {
Assuming that kprint_block_flush() is a combination of
kprint_block_printit() and kprint_block_abort(), you
coulld make a macro wrapper for this to preclude leaks:
#define KPRINT_BLOCK(block, level, code) \
do { \
struct kprint_block block; \
kprint_block_init(&block, KPRINT_##level); \
do { \
code ; \
kprint_block_printit(&block); \
while (0); \
kprint_block_abort(&block); \
} while(0)
The inner do { } while(0) region is so you can abort with "break".
(Or you can split it into KPRINT_BEGIN() and KPRINT_END() macros,
if that works out to be cleaner.)
-
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Andrew Morton | Re: Ext3 vs NTFS performance |
git: | |
| Johannes Sixt | [PATCH 03/40] Add target architecture MinGW. |
| Sergei Organov | Newbie: report of first experience with git-rebase. |
| Scott Chacon | Git Community Book |
| Sebastian Schuberth | git on Cygwin: Not a valid object name HEAD |
| Richard Stallman | Real men don't attack straw men |
| Marius ROMAN | 1440x900 resolution problem |
| Leon Dippenaar | New tcp stack attack |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Linus Torvalds | Re: [crash] kernel BUG at net/core/dev.c:1328! |
| Frithjof Hammer | Re: [LARTC] ifb and ppp |
