cregit-Linux how code gets into the kernel

Release 4.14 arch/metag/include/asm/cmpxchg_lock1.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_METAG_CMPXCHG_LOCK1_H

#define __ASM_METAG_CMPXCHG_LOCK1_H

#include <asm/global_lock.h>

/* Use LOCK2 as these have to be atomic w.r.t. ordinary accesses. */


static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val) { unsigned long flags, retval; __global_lock2(flags); fence(); retval = *m; *m = val; __global_unlock2(flags); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan49100.00%1100.00%
Total49100.00%1100.00%


static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val) { unsigned long flags, retval; __global_lock2(flags); fence(); retval = *m; *m = val & 0xff; __global_unlock2(flags); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan51100.00%1100.00%
Total51100.00%1100.00%


static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new) { __u32 retval; unsigned long flags; __global_lock2(flags); retval = *m; if (retval == old) { fence(); *m = new; } __global_unlock2(flags); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan62100.00%1100.00%
Total62100.00%1100.00%

#endif /* __ASM_METAG_CMPXCHG_LOCK1_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
James Hogan17599.43%150.00%
Greg Kroah-Hartman10.57%150.00%
Total176100.00%2100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.