upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / staging / tidspbridge / include / dspbridge / gs.h
1 /*
2  * gs.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Memory allocation/release wrappers.  This module allows clients to
7  * avoid OS spacific issues related to memory allocation.  It also provides
8  * simple diagnostic capabilities to assist in the detection of memory
9  * leaks.
10  *
11  * Copyright (C) 2005-2006 Texas Instruments, Inc.
12  *
13  * This package is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License version 2 as
15  * published by the Free Software Foundation.
16  *
17  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20  */
21
22 #ifndef GS_
23 #define GS_
24
25 /*
26  *  ======== gs_alloc ========
27  *  Alloc size bytes of space.  Returns pointer to space
28  *  allocated, otherwise NULL.
29  */
30 extern void *gs_alloc(u32 size);
31
32 /*
33  *  ======== gs_exit ========
34  *  Module exit.  Do not change to "#define gs_init()"; in
35  *  some environments this operation must actually do some work!
36  */
37 extern void gs_exit(void);
38
39 /*
40  *  ======== gs_free ========
41  *  Free space allocated by gs_alloc() or GS_calloc().
42  */
43 extern void gs_free(void *ptr);
44
45 /*
46  *  ======== gs_frees ========
47  *  Free space allocated by gs_alloc() or GS_calloc() and assert that
48  *  the size of the allocation is size bytes.
49  */
50 extern void gs_frees(void *ptr, u32 size);
51
52 /*
53  *  ======== gs_init ========
54  *  Module initialization.  Do not change to "#define gs_init()"; in
55  *  some environments this operation must actually do some work!
56  */
57 extern void gs_init(void);
58
59 #endif /*GS_ */