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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [bsd_tcpip/] [v2_0/] [include/] [sys/] [malloc.h] - Blame information for rev 307

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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