OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libl4/] [include/] [l4lib/] [lib/] [addr.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Address allocation pool.
3
 *
4
 * Copyright (C) 2007 Bahadir Balban
5
 */
6
#ifndef __ADDR_H__
7
#define __ADDR_H__
8
 
9
#include <l4lib/lib/idpool.h>
10
 
11
/* Address pool to allocate from a range of addresses */
12
struct address_pool {
13
        struct id_pool *idpool;
14
        unsigned long start;
15
        unsigned long end;
16
};
17
 
18
int address_pool_init(struct address_pool *pool,
19
                      struct id_pool *idpool,
20
                      unsigned long start, unsigned long end);
21
int address_pool_alloc_init(struct address_pool *pool,
22
                            unsigned long start, unsigned long end,
23
                            unsigned int size);
24
void *address_new(struct address_pool *pool, int nitems, int size);
25
int address_del(struct address_pool *, void *addr, int nitems, int size);
26
 
27
#endif /* __ADDR_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.