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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [bsd_tcpip/] [current/] [include/] [sys/] [malloc.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      include/sys/malloc.h
4
//
5
//==========================================================================
6
// ####BSDCOPYRIGHTBEGIN####                                    
7
// -------------------------------------------                  
8
// This file is part of eCos, the Embedded Configurable Operating System.
9
//
10
// Portions of this software may have been derived from FreeBSD 
11
// or other sources, and if so are covered by the appropriate copyright
12
// and license included herein.                                 
13
//
14
// Portions created by the Free Software Foundation are         
15
// Copyright (C) 2002 Free Software Foundation, Inc.            
16
// -------------------------------------------                  
17
// ####BSDCOPYRIGHTEND####                                      
18
//==========================================================================
19
 
20
#ifndef _SYS_MALLOC_H_
21
#define _SYS_MALLOC_H_
22
 
23
#ifndef _KERNEL
24
#warn This file is only suitable for kernel level code in a network stack!
25
#endif
26
 
27
/*
28
 * flags to malloc
29
 */
30
#define M_WAITOK        0x0000
31
#define M_NOWAIT        0x0001
32
#define M_ZERO          0x0008    // bzero (clear) allocated area
33
 
34
externC void *cyg_net_malloc(u_long size, int type, int flags);
35
externC void cyg_net_free(caddr_t addr, int type);
36
#define MALLOC(space, cast, size, type, flags) \
37
        (space) = (cast)cyg_net_malloc((u_long)(size), (int)type, flags)
38
#define malloc(size, type, flags) cyg_net_malloc((u_long)size, (int)type, flags)
39
#define FREE(addr, type) cyg_net_free((caddr_t)(addr), (int)type)
40
#define free(addr, type) FREE(addr, (int)type)
41
 
42
// Memory types
43
#define M_DEVBUF        3
44
#define M_PCB           (void *)4       /* protocol control block */
45
#define M_RTABLE        5       /* routing tables */
46
#define M_IFADDR        9       /* interface address */
47
#define M_IFMADDR       55      /* link-level multicast address */
48
#define M_IPMADDR       66      /* link-level multicast address */
49
#define M_IGMP          99      /* gateway info */
50
#define M_SONAME        98
51
#define M_IPMOPTS       97
52
#define M_TSEGQ         96
53
#define M_ACCF          95      /* accept filter data */
54
#define M_TEMP          94      /* misc temp buffers */
55
#define M_IPFLOW        93
56
#define M_NETADDR       92
57
#define M_IP6OPT        91
58
#define M_IP6NDP        90
59
#define M_MRTABLE       89
60
#define M_FTABLE        88
61
#define M_SYSCTLOID    100     
62
#define M_SYSCTL       101     
63
#define M_SECA         102
64
 
65
#endif // _SYS_MALLOC_H_

powered by: WebSVN 2.1.0

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