Spinlock definition
Posted Feb 2, 2012 11:39 UTC (Thu) by
abacus (guest, #49001)
Parent article:
Betrayed by a bitfield
From arch/x86/include/asm/spinlock_types.h:
typedef u8 __ticket_t;
typedef u16 __ticketpair_t;
typedef struct arch_spinlock {
union {
__ticketpair_t head_tail;
struct __raw_tickets {
__ticket_t head, tail;
} tickets;
};
} arch_spinlock_t;
Shouldn't all the above fields have been declared as volatile ?
(
Log in to post comments)