|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv6 1/3] xen: use ticket locks for spin locks
On 18/05/15 11:16, Jan Beulich wrote:
>>>> On 14.05.15 at 13:21, <david.vrabel@xxxxxxxxxx> wrote:
>> void _spin_lock(spinlock_t *lock)
>> {
>> + spinlock_tickets_t tickets = { .tail = 1, };
>
> This breaks the build on gcc 4.3.x (due to tail being a member of an
> unnamed structure member of a union).
I don't have a gcc that old to hand but isn't the error here that .tail
is part of the structure that isn't the first member of a union?
Does this fix your gcc 4.3 build?
--- a/xen/include/xen/spinlock.h
+++ b/xen/include/xen/spinlock.h
@@ -115,7 +115,7 @@ extern void spinlock_profile_reset(unsigned char key);
struct lock_profile_qhead { };
-#define SPIN_LOCK_UNLOCKED { { 0 }, 0xfffu, 0, _LOCK_DEBUG }
+#define SPIN_LOCK_UNLOCKED { {}, 0xfffu, 0, _LOCK_DEBUG }
#define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
#define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
@@ -125,11 +125,11 @@ struct lock_profile_qhead { };
#endif
typedef union {
- u32 head_tail;
struct {
u16 head;
u16 tail;
};
+ u32 head_tail;
} spinlock_tickets_t;
typedef struct spinlock {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |