74
74
void fd_nonblock (int);
75
75
void fd_block (int);
77
#ifdef VBOX_WITH_SLIRP_BSD_MBUF
79
#define UMA_ALIGN_PTR (1 << 0)
80
#define UMA_ZONE_REFCNT (1 << 1)
81
#define UMA_ZONE_MAXBUCKET (1 << 2)
82
#define UMA_ZONE_ZINIT (1 << 3)
83
#define UMA_SLAB_KERNEL (1 << 4)
84
#define UMA_ZFLAG_FULL (1 << 5)
87
typedef struct uma_zone *uma_zone_t;
88
typedef void *(*uma_alloc_t)(uma_zone_t, int, u_int8_t *, int);
89
typedef void (*uma_free_t)(void *, int, u_int8_t);
91
typedef int (*ctor_t)(PNATState, void *, int, void *, int);
92
typedef void (*dtor_t)(PNATState, void *, int, void *);
93
typedef int (*zinit_t)(PNATState, void *, int, int);
94
typedef void (*zfini_t)(PNATState, void *, int);
95
uma_zone_t uma_zcreate(PNATState, char *, size_t, ctor_t, dtor_t, zinit_t, zfini_t, int, int);
96
uma_zone_t uma_zsecond_create(char *, ctor_t, dtor_t, zinit_t, zfini_t, uma_zone_t);
97
void uma_zone_set_max(uma_zone_t, int);
98
void uma_zone_set_allocf(uma_zone_t, uma_alloc_t);
99
void uma_zone_set_freef(uma_zone_t, uma_free_t);
101
uint32_t *uma_find_refcnt(uma_zone_t, void *);
102
void *uma_zalloc(uma_zone_t, int);
103
void *uma_zalloc_arg(uma_zone_t, void *, int);
104
void uma_zfree(uma_zone_t, void *);
105
void uma_zfree_arg(uma_zone_t, void *, void *);
106
int uma_zone_exhausted_nolock(uma_zone_t);
107
void zone_drain(uma_zone_t);
109
void slirp_null_arg_free(void *, void *);