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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [include/] [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 <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_with_idpool(struct address_pool *pool,
19
                                  struct id_pool *idpool,
20
                                  unsigned long start, unsigned long end);
21
int address_pool_init(struct address_pool *pool, unsigned long start,
22
                      unsigned long end);
23
void *address_new(struct address_pool *pool, int npages);
24
int address_del(struct address_pool *, void *addr, int npages);
25
 
26
#endif /* __ADDR_H__ */

powered by: WebSVN 2.1.0

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