[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 02/12] continuation: Fix container_of() redefin
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [RFC][PATCH 02/12] continuation: Fix container_of() redefinition |
Date: |
Sat, 22 Jan 2011 09:29:17 +0000 |
QEMU already has a visible container_of() macro definition. Avoid the
compiler error.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
continuation.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/continuation.h b/continuation.h
index 585788e..112df65 100644
--- a/continuation.h
+++ b/continuation.h
@@ -45,8 +45,10 @@ int cc_release(struct continuation *cc);
int cc_swap(struct continuation *from, struct continuation *to);
#define offset_of(type, member) ((unsigned long)(&((type *)0)->member))
+#ifndef container_of
#define container_of(obj, type, member) \
(type *)(((char *)obj) - offset_of(type, member))
+#endif
#endif
/*
--
1.7.2.3
- Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O, (continued)
- [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Stefan Hajnoczi, 2011/01/22
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Avi Kivity, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Anthony Liguori, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Avi Kivity, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Anthony Liguori, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Avi Kivity, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Anthony Liguori, 2011/01/26
- Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library, Anthony Liguori, 2011/01/26
[Qemu-devel] [RFC][PATCH 03/12] Make sure to release allocated stack when coroutine is released., Stefan Hajnoczi, 2011/01/22
[Qemu-devel] [RFC][PATCH 02/12] continuation: Fix container_of() redefinition,
Stefan Hajnoczi <=
Re: [Qemu-devel] [RFC][PATCH 00/12] qcow2: Convert qcow2 to use coroutines for async I/O, Anthony Liguori, 2011/01/23
[Qemu-devel] Re: [RFC][PATCH 00/12] qcow2: Convert qcow2 to use coroutines for async I/O, Kevin Wolf, 2011/01/24