Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
blackfin
include
asm
atomic.h
Go to the documentation of this file.
1
/*
2
* Copyright 2004-2011 Analog Devices Inc.
3
*
4
* Licensed under the GPL-2 or later.
5
*/
6
7
#ifndef __ARCH_BLACKFIN_ATOMIC__
8
#define __ARCH_BLACKFIN_ATOMIC__
9
10
#include <asm/cmpxchg.h>
11
12
#ifdef CONFIG_SMP
13
14
#include <linux/linkage.h>
15
16
asmlinkage
int
__raw_uncached_fetch_asm(
const
volatile
int
*
ptr
);
17
asmlinkage
int
__raw_atomic_update_asm(
volatile
int
*
ptr
,
int
value
);
18
asmlinkage
int
__raw_atomic_clear_asm(
volatile
int
*
ptr
,
int
value
);
19
asmlinkage
int
__raw_atomic_set_asm(
volatile
int
*
ptr
,
int
value
);
20
asmlinkage
int
__raw_atomic_xor_asm(
volatile
int
*
ptr
,
int
value
);
21
asmlinkage
int
__raw_atomic_test_asm(
const
volatile
int
*
ptr
,
int
value
);
22
23
#define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter)
24
25
#define atomic_add_return(i, v) __raw_atomic_update_asm(&(v)->counter, i)
26
#define atomic_sub_return(i, v) __raw_atomic_update_asm(&(v)->counter, -(i))
27
28
#define atomic_clear_mask(m, v) __raw_atomic_clear_asm(&(v)->counter, m)
29
#define atomic_set_mask(m, v) __raw_atomic_set_asm(&(v)->counter, m)
30
31
#endif
32
33
#include <
asm-generic/atomic.h
>
34
35
#endif
Generated on Thu Jan 10 2013 12:49:06 for Linux Kernel by
1.8.2