source: svn/newcon3bcm2_21bu/BSEAV/lib/utils/bpool.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2007, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bpool.h $
11 * $brcm_Revision: 2 $
12 * $brcm_Date: 2/14/07 5:45p $
13 *
14 * Module Description:
15 *
16 * Pool alloc library
17 *
18 * Revision History:
19 *
20 * $brcm_Log: /BSEAV/lib/utils/bpool.h $
21 *
22 * 2   2/14/07 5:45p vsilyaev
23 * PR 25701: Added code to dump content/status of allocator
24 *
25 * 1   2/5/07 5:29p vsilyaev
26 * PR 25701:Portions of stackable parsing framework
27 *
28 *
29 *******************************************************************************/
30#ifndef __BPOOL_H__
31#define __BPOOL_H__
32#include "balloc.h"
33
34#ifdef __cplusplus
35extern "C"
36{
37#endif
38
39typedef struct bpool *bpool_t;
40typedef struct bpool_status {
41        unsigned pools;
42        unsigned free;
43        unsigned allocated;
44} bpool_status;
45
46bpool_t bpool_create(balloc_iface_t alloc, size_t nelem, size_t elem_size);
47void bpool_destroy(bpool_t pool);
48
49void *bpool_alloc(bpool_t pool, size_t size);
50void bpool_free(bpool_t pool, void *ptr);
51bool bpool_test_block(bpool_t pool, void *ptr);
52void bpool_get_status(bpool_t pool, bpool_status *status);
53balloc_iface_t bpool_alloc_iface(bpool_t pool);
54
55void bpool_join(bpool_t parent, bpool_t child);
56bool bpool_is_empty(bpool_t pool);
57void bpool_detach(bpool_t parent, bpool_t child);
58bpool_t bpool_last_child(bpool_t pool);
59void bpool_dump(bpool_t pool);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* __BPOOL_H__ */
66
Note: See TracBrowser for help on using the repository browser.