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
sh
include
asm
sram.h
Go to the documentation of this file.
1
#ifndef __ASM_SRAM_H
2
#define __ASM_SRAM_H
3
4
#ifdef CONFIG_HAVE_SRAM_POOL
5
6
#include <
linux/spinlock.h
>
7
#include <
linux/genalloc.h
>
8
9
/* arch/sh/mm/sram.c */
10
extern
struct
gen_pool
*
sram_pool
;
11
12
static
inline
unsigned
long
sram_alloc
(
size_t
len)
13
{
14
if
(!sram_pool)
15
return
0
UL
;
16
17
return
gen_pool_alloc
(sram_pool, len);
18
}
19
20
static
inline
void
sram_free
(
unsigned
long
addr
,
size_t
len)
21
{
22
return
gen_pool_free
(sram_pool, addr, len);
23
}
24
25
#else
26
27
static
inline
unsigned
long
sram_alloc
(
size_t
len)
28
{
29
return
0;
30
}
31
32
static
inline
void
sram_free
(
unsigned
long
addr
,
size_t
len)
33
{
34
}
35
36
#endif
/* CONFIG_HAVE_SRAM_POOL */
37
38
#endif
/* __ASM_SRAM_H */
Generated on Thu Jan 10 2013 12:58:31 for Linux Kernel by
1.8.2