Skip to content

Commit b0fe545

Browse files
committed
tools/virtio: stub might_sleep and synchronize_rcu
Add might_sleep() and synchronize_rcu() stubs needed by virtio_config.h. might_sleep() is a no-op, synchronize_rcu doesn't work but we don't need it to. Created using Cursor CLI. Message-ID: <5557e026335d808acd7b890693ee1382e73dd33a.1764873799.git.mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent a2f964c commit b0fe545

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tools/virtio/linux/kernel.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ static inline bool is_vmalloc_addr(const void *x)
144144
return false;
145145
}
146146

147+
#define might_sleep() do { } while (0)
148+
149+
static inline void synchronize_rcu(void)
150+
{
151+
assert(0);
152+
}
153+
147154
#define min(x, y) ({ \
148155
typeof(x) _min1 = (x); \
149156
typeof(y) _min2 = (y); \

0 commit comments

Comments
 (0)