util.h (9a02b7eeeb446a0418ec83afc80eb38bc188f5c8) | util.h (dc9d98d621bdce0552997200ce855659875a5c9f) |
---|---|
1 2#ifndef _BCACHE_UTIL_H 3#define _BCACHE_UTIL_H 4 5#include <linux/blkdev.h> 6#include <linux/errno.h> 7#include <linux/kernel.h> 8#include <linux/llist.h> --- 4 unchanged lines hidden (view full) --- 13#include "closure.h" 14 15#define PAGE_SECTORS (PAGE_SIZE / 512) 16 17struct closure; 18 19#ifdef CONFIG_BCACHE_DEBUG 20 | 1 2#ifndef _BCACHE_UTIL_H 3#define _BCACHE_UTIL_H 4 5#include <linux/blkdev.h> 6#include <linux/errno.h> 7#include <linux/kernel.h> 8#include <linux/llist.h> --- 4 unchanged lines hidden (view full) --- 13#include "closure.h" 14 15#define PAGE_SECTORS (PAGE_SIZE / 512) 16 17struct closure; 18 19#ifdef CONFIG_BCACHE_DEBUG 20 |
21#define EBUG_ON(cond) BUG_ON(cond) |
|
21#define atomic_dec_bug(v) BUG_ON(atomic_dec_return(v) < 0) 22#define atomic_inc_bug(v, i) BUG_ON(atomic_inc_return(v) <= i) 23 24#else /* DEBUG */ 25 | 22#define atomic_dec_bug(v) BUG_ON(atomic_dec_return(v) < 0) 23#define atomic_inc_bug(v, i) BUG_ON(atomic_inc_return(v) <= i) 24 25#else /* DEBUG */ 26 |
27#define EBUG_ON(cond) do { if (cond); } while (0) |
|
26#define atomic_dec_bug(v) atomic_dec(v) 27#define atomic_inc_bug(v, i) atomic_inc(v) 28 29#endif 30 31#define DECLARE_HEAP(type, name) \ 32 struct { \ 33 size_t size, used; \ --- 553 unchanged lines hidden --- | 28#define atomic_dec_bug(v) atomic_dec(v) 29#define atomic_inc_bug(v, i) atomic_inc(v) 30 31#endif 32 33#define DECLARE_HEAP(type, name) \ 34 struct { \ 35 size_t size, used; \ --- 553 unchanged lines hidden --- |