added some missing functions for freebsd current
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28760 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -128,6 +128,7 @@ void m_copyback(struct mbuf *, int, int, caddr_t);
|
||||
|
||||
struct mbuf *m_get(int how, short type);
|
||||
struct mbuf *m_gethdr(int how, short type);
|
||||
struct mbuf *m_getjcl(int how, short type, int flags, int size);
|
||||
void m_clget(struct mbuf *m, int how);
|
||||
void *m_cljget(struct mbuf *m, int how, int size);
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist,
|
||||
|
||||
static inline int sysctl_handle_long(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
static inline int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
static inline int sysctl_handle_quad(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
static inline int sysctl_handle_int(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
static inline int sysctl_handle_string(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
|
||||
@@ -98,6 +99,10 @@ static inline int sysctl_handle_string(SYSCTL_HANDLER_ARGS) { return -1; }
|
||||
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_ULONG|(access), \
|
||||
ptr, 0, sysctl_handle_long, "LU", __DESCR(descr))
|
||||
|
||||
#define SYSCTL_ADD_QUAD(ctx, parent, nbr, name, access, ptr, descr) \
|
||||
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_QUAD|(access), \
|
||||
ptr, 0, sysctl_handle_quad, "Q", __DESCR(descr))
|
||||
|
||||
#define SYSCTL_ADD_OPAQUE(ctx, parent, nbr, name, access, ptr, len, fmt, descr)\
|
||||
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \
|
||||
ptr, len, sysctl_handle_opaque, fmt, __DESCR(descr))
|
||||
|
||||
@@ -169,6 +169,22 @@ m_gethdr(int how, short type)
|
||||
}
|
||||
|
||||
|
||||
struct mbuf *
|
||||
m_getjcl(int how, short type, int flags, int size)
|
||||
{
|
||||
struct mbuf *mb =
|
||||
(struct mbuf *)object_cache_alloc(sMBufCache, m_to_oc_flags(how));
|
||||
if (mb == NULL)
|
||||
return NULL;
|
||||
if (construct_ext_sized_mbuf(mb, how, size) < 0) {
|
||||
object_cache_free(sMBufCache, mb);
|
||||
return NULL;
|
||||
}
|
||||
mb->m_flags |= flags;
|
||||
return mb;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
m_clget(struct mbuf *m, int how)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user