spinlock.h.rej
von Anonymous- SNIPPET_TEXT:
-
- ***************
- *** 54,74 ****
- * much between them in performance though, especially as locks are out of line.
- */
- #if (NR_CPUS < 256)
- - static inline int __raw_spin_is_locked(raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 8) & 0xff) != (tmp & 0xff));
- }
- - static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 8) - tmp) & 0xff) > 1;
- }
- - static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
- {
- short inc = 0x0100;
- --- 54,74 ----
- * much between them in performance though, especially as locks are out of line.
- */
- #if (NR_CPUS < 256)
- + static inline int __raw_spin_is_locked(__raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 8) & 0xff) != (tmp & 0xff));
- }
- + static inline int __raw_spin_is_contended(__raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 8) - tmp) & 0xff) > 1;
- }
- + static __always_inline void __raw_spin_lock(__raw_spinlock_t *lock)
- {
- short inc = 0x0100;
- *************** static __always_inline void __raw_spin_u
- *** 118,138 ****
- : "memory", "cc");
- }
- #else
- - static inline int __raw_spin_is_locked(raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 16) & 0xffff) != (tmp & 0xffff));
- }
- - static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 16) - tmp) & 0xffff) > 1;
- }
- - static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
- {
- int inc = 0x00010000;
- int tmp;
- --- 118,138 ----
- : "memory", "cc");
- }
- #else
- + static inline int __raw_spin_is_locked(__raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 16) & 0xffff) != (tmp & 0xffff));
- }
- + static inline int __raw_spin_is_contended(__raw_spinlock_t *lock)
- {
- int tmp = ACCESS_ONCE(lock->slock);
- return (((tmp >> 16) - tmp) & 0xffff) > 1;
- }
- + static __always_inline void __raw_spin_lock(__raw_spinlock_t *lock)
- {
- int inc = 0x00010000;
- int tmp;
Quellcode
Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN