Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 109501
Collapse All | Expand All

(-)spinlock.h.org (-8 / +9 lines)
Lines 34-39 Link Here
34
34
35
#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
35
#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
36
36
37
#if (__GNUC__ > 2)
38
  typedef struct { } rwlock_t;
39
  #define RW_LOCK_UNLOCKED (rwlock_t) { }
40
#else
41
  typedef struct { int gcc_is_buggy; } rwlock_t;
42
  #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
43
#endif
44
45
37
/*
46
/*
38
 * If CONFIG_SMP is set, pull in the _raw_* definitions
47
 * If CONFIG_SMP is set, pull in the _raw_* definitions
39
 */
48
 */
Lines 219-232 Link Here
219
228
220
/* RW spinlocks: No debug version */
229
/* RW spinlocks: No debug version */
221
230
222
#if (__GNUC__ > 2)
223
  typedef struct { } rwlock_t;
224
  #define RW_LOCK_UNLOCKED (rwlock_t) { }
225
#else
226
  typedef struct { int gcc_is_buggy; } rwlock_t;
227
  #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
228
#endif
229
230
#define rwlock_init(lock)	do { (void)(lock); } while(0)
231
#define rwlock_init(lock)	do { (void)(lock); } while(0)
231
#define _raw_read_lock(lock)	do { (void)(lock); } while(0)
232
#define _raw_read_lock(lock)	do { (void)(lock); } while(0)
232
#define _raw_read_unlock(lock)	do { (void)(lock); } while(0)
233
#define _raw_read_unlock(lock)	do { (void)(lock); } while(0)

Return to bug 109501