#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/mbuf.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/atm/ngatmbase.h>
Go to the source code of this file.
|
#define | ASSERT(E, M) KASSERT(E,M) |
|
#define | UNIMEM_TYPES 5 |
|
#define | INS_ALLOC() ng_uni_malloc(UNIMEM_INS, __FILE__, __LINE__) |
|
#define | INS_FREE(P) ng_uni_free(UNIMEM_INS, P, __FILE__, __LINE__) |
|
#define | UNI_ALLOC() ng_uni_malloc(UNIMEM_ALL, __FILE__, __LINE__) |
|
#define | UNI_FREE(P) ng_uni_free(UNIMEM_ALL, P, __FILE__, __LINE__) |
|
#define | SIG_ALLOC() ng_uni_malloc(UNIMEM_SIG, __FILE__, __LINE__) |
|
#define | SIG_FREE(P) ng_uni_free(UNIMEM_SIG, P, __FILE__, __LINE__) |
|
#define | CALL_ALLOC() ng_uni_malloc(UNIMEM_CALL, __FILE__, __LINE__) |
|
#define | CALL_FREE(P) ng_uni_free(UNIMEM_CALL, P, __FILE__, __LINE__) |
|
#define | PARTY_ALLOC() ng_uni_malloc(UNIMEM_PARTY, __FILE__, __LINE__) |
|
#define | PARTY_FREE(P) ng_uni_free(UNIMEM_PARTY, P, __FILE__, __LINE__) |
|
#define | _TIMER_INIT(X, T) ng_callout_init(&(X)->T.c) |
|
#define | _TIMER_DESTROY(UNI, FIELD) _TIMER_STOP(UNI,FIELD) |
|
#define | _TIMER_STOP(UNI, FIELD) |
|
#define | TIMER_ISACT(UNI, T) |
|
#define | _TIMER_START(UNI, ARG, FIELD, DUE, FUNC) |
|
#define | TIMER_FUNC_UNI(T, F) |
|
#define | TIMER_FUNC_CALL(T, F) |
|
#define | TIMER_FUNC_PARTY(T, F) |
|
#define | UNICORE |
|
◆ _TIMER_DESTROY
#define _TIMER_DESTROY |
( |
|
UNI, |
|
|
|
FIELD |
|
) |
| _TIMER_STOP(UNI,FIELD) |
◆ _TIMER_INIT
◆ _TIMER_START
#define _TIMER_START |
( |
|
UNI, |
|
|
|
ARG, |
|
|
|
FIELD, |
|
|
|
DUE, |
|
|
|
FUNC |
|
) |
| |
Value: do { \
_TIMER_STOP(UNI, FIELD); \
ng_callout(&FIELD.c, (UNI)->arg, NULL, \
hz * (DUE) / 1000, FUNC, (ARG), 0); \
} while (0)
Definition at line 94 of file ng_uni_cust.h.
◆ _TIMER_STOP
#define _TIMER_STOP |
( |
|
UNI, |
|
|
|
FIELD |
|
) |
| |
Value: do { \
ng_uncallout(&FIELD.c, (UNI)->arg); \
} while (0)
Definition at line 89 of file ng_uni_cust.h.
◆ ASSERT
#define ASSERT |
( |
|
E, |
|
|
|
M |
|
) |
| KASSERT(E,M) |
◆ CALL_ALLOC
◆ CALL_FREE
◆ INS_ALLOC
◆ INS_FREE
◆ PARTY_ALLOC
◆ PARTY_FREE
◆ SIG_ALLOC
◆ SIG_FREE
◆ TIMER_FUNC_CALL
#define TIMER_FUNC_CALL |
( |
|
T, |
|
|
|
F |
|
) |
| |
Value:static void F(struct call *); \
static void \
_##T##_func(
node_p node,
hook_p hook,
void *arg1,
int arg2) \
{ \
struct call *call = (struct call *)arg1; \
struct uni *uni = call->uni; \
\
(F)(call); \
uni_work(uni); \
}
Definition at line 114 of file ng_uni_cust.h.
◆ TIMER_FUNC_PARTY
#define TIMER_FUNC_PARTY |
( |
|
T, |
|
|
|
F |
|
) |
| |
Value:static void F(struct party *); \
static void \
_##T##_func(
node_p node,
hook_p hook,
void *arg1,
int arg2) \
{ \
struct party *party = (struct party *)arg1; \
struct uni *uni = party->call->uni; \
\
(F)(party); \
uni_work(uni); \
}
Definition at line 129 of file ng_uni_cust.h.
◆ TIMER_FUNC_UNI
#define TIMER_FUNC_UNI |
( |
|
T, |
|
|
|
F |
|
) |
| |
Value:static void F(struct uni *); \
static void \
_##T##_func(
node_p node,
hook_p hook,
void *arg1,
int arg2) \
{ \
struct uni *uni = (struct uni *)arg1; \
\
(F)(uni); \
uni_work(uni); \
}
Definition at line 100 of file ng_uni_cust.h.
◆ TIMER_ISACT
#define TIMER_ISACT |
( |
|
UNI, |
|
|
|
T |
|
) |
| |
Value: (callout_active(&(UNI)->T.c) || \
callout_pending(&(UNI)->T.c))
Definition at line 92 of file ng_uni_cust.h.
◆ UNI_ALLOC
◆ UNI_FREE
◆ UNICORE
Value:
};
size_t unimem_sizes[UNIMEM_TYPES]
Definition at line 143 of file ng_uni_cust.h.
◆ UNIMEM_TYPES
◆ unimem
Enumerator |
---|
UNIMEM_INS | |
UNIMEM_ALL | |
UNIMEM_SIG | |
UNIMEM_CALL | |
UNIMEM_PARTY | |
Definition at line 53 of file ng_uni_cust.h.
◆ ng_uni_free()
void ng_uni_free |
( |
enum |
unimem, |
|
|
void * |
ptr, |
|
|
const char * |
file, |
|
|
u_int |
lno |
|
) |
| |
◆ ng_uni_malloc()
void * ng_uni_malloc |
( |
enum |
unimem, |
|
|
const char * |
file, |
|
|
u_int |
lno |
|
) |
| |
◆ unimem_sizes