#include <sys/param.h>
#include <sys/types.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/queue.h>
#include <sys/callout.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <machine/stdarg.h>
Go to the source code of this file.
|
#define | MEMINIT() |
|
#define | MEMZALLOC(PTR, CAST, SIZE) ((PTR) = (CAST)malloc((SIZE), M_NG_SSCFU, M_NOWAIT | M_ZERO)) |
|
#define | MEMFREE(PTR) free(PTR, M_NG_SSCFU) |
|
#define | SIG_ALLOC(PTR) MEMZALLOC(PTR, struct sscfu_sig *, sizeof(struct sscfu_sig)) |
|
#define | SIG_FREE(PTR) MEMFREE(PTR) |
|
#define | SIGQ_INIT(Q) TAILQ_INIT(Q) |
|
#define | SIGQ_APPEND(Q, S) TAILQ_INSERT_TAIL(Q, S, link) |
|
#define | SIGQ_GET(Q) ng_sscfu_sigq_get((Q)) |
|
#define | DECL_SIGQ_GET |
|
#define | SIGQ_CLEAR(Q) |
|
#define | MBUF_FREE(M) m_freem(M) |
|
#define | ASSERT(S) |
|
|
typedef | TAILQ_ENTRY (sscfu_sig) sscfu_sigq_link_t |
|
typedef | TAILQ_HEAD (sscfu_sigq, sscfu_sig) sscfu_sigq_head_t |
|
◆ ASSERT
◆ DECL_SIGQ_GET
Value:static __inline struct sscfu_sig * \
ng_sscfu_sigq_get(struct sscfu_sigq *q) \
{ \
struct sscfu_sig *s; \
\
s = TAILQ_FIRST(q); \
if (s != NULL) \
TAILQ_REMOVE(q, s, link); \
return (s); \
}
Definition at line 95 of file ng_sscfu_cust.h.
◆ MBUF_FREE
#define MBUF_FREE |
( |
|
M | ) |
m_freem(M) |
◆ MEMFREE
#define MEMFREE |
( |
|
PTR | ) |
free(PTR, M_NG_SSCFU) |
◆ MEMINIT
Value:
DECL_SIGQ_GET
MALLOC_DECLARE(M_NG_CCATM)
Definition at line 51 of file ng_sscfu_cust.h.
◆ MEMZALLOC
#define MEMZALLOC |
( |
|
PTR, |
|
|
|
CAST, |
|
|
|
SIZE |
|
) |
| ((PTR) = (CAST)malloc((SIZE), M_NG_SSCFU, M_NOWAIT | M_ZERO)) |
◆ SIG_ALLOC
#define SIG_ALLOC |
( |
|
PTR | ) |
MEMZALLOC(PTR, struct sscfu_sig *, sizeof(struct sscfu_sig)) |
◆ SIG_FREE
#define SIG_FREE |
( |
|
PTR | ) |
MEMFREE(PTR) |
◆ SIGQ_APPEND
#define SIGQ_APPEND |
( |
|
Q, |
|
|
|
S |
|
) |
| TAILQ_INSERT_TAIL(Q, S, link) |
◆ SIGQ_CLEAR
Value: do { \
struct sscfu_sig *_s1, *_s2; \
\
_s1 = TAILQ_FIRST(Q); \
while (_s1 != NULL) { \
_s2 = TAILQ_NEXT(_s1, link); \
if (_s1->m) \
MBUF_FREE(_s1->m); \
SIG_FREE(_s1); \
_s1 = _s2; \
} \
TAILQ_INIT(Q); \
} while (0)
Definition at line 107 of file ng_sscfu_cust.h.
◆ SIGQ_GET
#define SIGQ_GET |
( |
|
Q | ) |
ng_sscfu_sigq_get((Q)) |
◆ SIGQ_INIT
#define SIGQ_INIT |
( |
|
Q | ) |
TAILQ_INIT(Q) |
◆ TAILQ_ENTRY()
typedef TAILQ_ENTRY |
( |
sscfu_sig |
| ) |
|
◆ TAILQ_HEAD()
typedef TAILQ_HEAD |
( |
sscfu_sigq |
, |
|
|
sscfu_sig |
|
|
) |
| |