linux/include/asm-generic/cmpxchg-local.h
<<
>>
Prefs
   1#ifndef __ASM_GENERIC_CMPXCHG_LOCAL_H
   2#define __ASM_GENERIC_CMPXCHG_LOCAL_H
   3
   4#include <linux/types.h>
   5#include <linux/irqflags.h>
   6
   7extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
   8
   9/*
  10 * Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned
  11 * long parameter, supporting various types of architectures.
  12 */
  13static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
  14                unsigned long old, unsigned long new, int size)
  15{
  16        unsigned long flags, prev;
  17
  18        /*
   9/*1"2tion>, unsigned lone Sanity checkrch, ionpde=-timeude/asm-generic/cmpxchg-local.h#L12" id="L12" class="li2e" name=2L10">  10 * Generic version of _gned loneude/asm-generic/cmpxchg-local.h#L13" id="L13" class="li2e" name=2L11">  11if (lass="sref">size)
   2#define wrong_size_cmpxchg(volatile void *ptr);
  13static   14          2     2nsigned long ass="sref">ptr)
ptr,   15{
size)
  16        un2igned2long prev;
sizu8>;
ptr);
  17
sizv;
old, unsigned long   18        sizu8>;
ptr);
sizu8>;
ptr, int    9  10prev;
sizu"L16">  16ptr);
  11sizv;
old, unsigned long    2#define sizu"L16">  16ptr);
sizu"L16">  16ptr, int    3
  14          3     34ong prev;
sizu3L2">   2ptr);
  15{
sizv;
old, unsigned long   16        un3igned36signed long sizu3L2">   2ptr);
sizu3L2">   2ptr, int   17
  18        prev;
sizu642">   2ptr);
   9sizv;
old, unsigned long   10sizu642">   2ptr);
sizu642">   2ptr, int   11   2#define    3
wrong_size_cmpxchg(volatile void *ptr);
   4#include <     44ong   15{
ptr)
ptr,   16        un4igned46signed long t type=lass="sref">prev;
  17
  18           9/*
  10 * Generic version of __cmpxchg_local (disables inter64atile pan>
  11 * long parameter, suppoude/asm-generic/cmpxchg-local.h#L13" id="L13" class="li5" name="5L2">   2#define inline unsigned long sizu642">   2__cmpxchg_local_generic(vol64atile >__cmpxc href="+code=ptr" class="sref">ptr,
   3
   2, unsigned long    2, int    4#include &l5     54/asm-generic/cmpxchg-local.h#L16" id="L16" class="li5" name="LL5">   5#include <inclu55signed long ass="sref">ptr   2;
  16        un5igned5long flags,   17
  18        ptr)
ptr,    9ptr;
sizu642">   2ptr);
  10sizv;
old, unsigned long   11sizu642">   2ptr);
ptr, int    2#define ptr)
ptr,    3
prev;
   4#include &l6     64sign}generic/cmpxchg-local.h#L8" id="L8" class="line6" name="6L5">   5#include &l6inclu65asm-generic/cmpxchg-local.h#L18" id="L18" class="li6" name="LL6">   6
  17


17 The original LXR software by th_GENERIC_CMhttp://sourceforge.net/luojects/lxt">LXR eterunity href=ype= exp18"r, sal ocal (diby ENERIC_CMmailto:lxt@t; 17 txt.t;