comparison gsm-fw/riviera/rvf/rvf_mem_pool.c @ 143:afceeeb2cba1

Our nuc-fw is destined to become gsm-fw, so I went ahead and did the big hg mv
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 12 Nov 2013 05:35:48 +0000
parents nuc-fw/riviera/rvf/rvf_mem_pool.c@e7d4ec9c4c32
children 78495749970a
comparison
equal deleted inserted replaced
142:15d5977390c2 143:afceeeb2cba1
1 /****************************************************************************/
2 /* */
3 /* Name rvf_mem_pool.c */
4 /* */
5 /* Function this file contains the definition of main memory pool */
6 /* */
7 /* Version 0.1 */
8 /* */
9 /* Date Modification */
10 /* ------------------------------------ */
11 /* 06/08/02 Create */
12 /* */
13 /* Author Laurent Sollier (l-sollier@ti.com) */
14 /* */
15 /* (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved*/
16 /****************************************************************************/
17
18 #include "rvf_pool_size.h"
19 #include "rvf_cust.h"
20
21 /******** MEMORY POOLS ******************/
22 /* Define the buffer pools */
23 T_RVF_POOL _rvf_pools[RVF_NB_POOLS];
24
25
26 /* allocated static buffer pools */
27 UINT8 Buf0[RVF_POOL_0_SIZE];
28
29 #if (RVF_NB_POOLS > 1)
30 UINT8 Buf1[RVF_POOL_1_SIZE];
31 #endif
32
33 /*******************************************************************************
34 **
35 ** Function _rvf_init_mem_pool
36 **
37 ** Description This function is called to initialize the different memory
38 ** pool.
39 **
40 ** Returns void
41 **
42 *******************************************************************************/
43 void _rvf_init_mem_pool(void)
44 {
45 /* initialize buffer pools */
46 _rvf_init_free_queue(0, RVF_POOL_0_SIZE, (UINT8 *)Buf0);
47
48 #if (RVF_NB_POOLS > 1)
49 _rvf_init_free_queue(1, RVF_POOL_1_SIZE, (UINT8 *)Buf1);
50 #endif
51 }
52
53 /*******************************************************************************
54 **
55 ** Function _rvf_get_mem_usage_ratio
56 **
57 ** Description This function is called to have the value of
58 ** RVF_MEM_USAGE_RATIO.
59 **
60 ** Returns The value of RVF_MEM_USAGE_RATIO (see details of this value
61 ** in rvf_pool_size.h)
62 **
63 *******************************************************************************/
64 UINT16 _rvf_get_mem_usage_ratio(void)
65 {
66 return RVF_MEM_USAGE_RATIO;
67 }
68
69 /*******************************************************************************
70 **
71 ** Function _rvf_get_number_of_pool
72 **
73 ** Description This function is called to have the number of memory pool.
74 **
75 ** Returns The number of available different pool
76 **
77 *******************************************************************************/
78 UINT16 _rvf_get_number_of_pool(void)
79 {
80 return RVF_NB_POOLS;
81 }