Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139072
b: refs/heads/master
c: c5f841f
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Mar 30, 2009
1 parent 76b0253 commit be3051c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a35ce7dcefe9e80a00603a195269fbaf6e7d901
refs/heads/master: c5f841f1780dad7efb7eca092f60742d47f47d25
12 changes: 9 additions & 3 deletions trunk/drivers/virtio/virtio_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@
#ifdef DEBUG
/* For development, we want to crash whenever the ring is screwed. */
#define BAD_RING(_vq, fmt...) \
do { dev_err(&_vq->vq.vdev->dev, fmt); BUG(); } while(0)
#define START_USE(_vq) \
do { if ((_vq)->in_use) panic("in_use = %i\n", (_vq)->in_use); (_vq)->in_use = __LINE__; mb(); } while(0)
do { dev_err(&(_vq)->vq.vdev->dev, fmt); BUG(); } while(0)
/* Caller is supposed to guarantee no reentry. */
#define START_USE(_vq) \
do { \
if ((_vq)->in_use) \
panic("in_use = %i\n", (_vq)->in_use); \
(_vq)->in_use = __LINE__; \
mb(); \
} while(0)
#define END_USE(_vq) \
do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0)
#else
Expand Down

0 comments on commit be3051c

Please sign in to comment.