FreeBSD kernel kern code
|
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/kernel.h>
#include <sys/mutex.h>
#include <sys/msgbuf.h>
#include <sys/sysctl.h>
Go to the source code of this file.
Macros | |
#define | MAXPRIBUF (sizeof(intmax_t) * NBBY + 3) |
#define | SEQMOD(size) ((size) * 16) |
Functions | |
static u_int | msgbuf_cksum (struct msgbuf *mbp) |
SYSCTL_INT (_kern, OID_AUTO, msgbuf_show_timestamp, CTLFLAG_RWTUN, &msgbuf_show_timestamp, 0, "Show timestamp in msgbuf") | |
void | msgbuf_init (struct msgbuf *mbp, void *ptr, int size) |
void | msgbuf_reinit (struct msgbuf *mbp, void *ptr, int size) |
void | msgbuf_clear (struct msgbuf *mbp) |
int | msgbuf_getcount (struct msgbuf *mbp) |
static void | msgbuf_do_addchar (struct msgbuf *const mbp, const int c) |
void | msgbuf_addchar (struct msgbuf *mbp, int c) |
void | msgbuf_addstr (struct msgbuf *mbp, int pri, const char *str, int filter_cr) |
int | msgbuf_getchar (struct msgbuf *mbp) |
int | msgbuf_getbytes (struct msgbuf *mbp, char *buf, int buflen) |
int | msgbuf_peekbytes (struct msgbuf *mbp, char *buf, int buflen, u_int *seqp) |
void | msgbuf_copy (struct msgbuf *src, struct msgbuf *dst) |
void | msgbuf_duplicate (struct msgbuf *src, struct msgbuf *dst, char *dst_msgptr) |
Variables | |
static int | msgbuf_show_timestamp = 0 |
#define MAXPRIBUF (sizeof(intmax_t) * NBBY + 3) |
Definition at line 46 of file subr_msgbuf.c.
#define SEQMOD | ( | size | ) | ((size) * 16) |
Definition at line 49 of file subr_msgbuf.c.
void msgbuf_addchar | ( | struct msgbuf * | mbp, |
int | c | ||
) |
Definition at line 166 of file subr_msgbuf.c.
References msgbuf_do_addchar().
Referenced by msgbuf_copy(), msglogchar(), and prf_putchar().
void msgbuf_addstr | ( | struct msgbuf * | mbp, |
int | pri, | ||
const char * | str, | ||
int | filter_cr | ||
) |
Definition at line 186 of file subr_msgbuf.c.
References buf, MAXPRIBUF, msgbuf_do_addchar(), msgbuf_show_timestamp, snprintf(), sprintf(), and time_uptime.
Referenced by msglogstr(), and prf_putbuf().
|
static |
Definition at line 391 of file subr_msgbuf.c.
Referenced by msgbuf_reinit().
void msgbuf_clear | ( | struct msgbuf * | mbp | ) |
Definition at line 119 of file subr_msgbuf.c.
Referenced by msgbuf_init(), msgbuf_reinit(), and sysctl_kern_msgbuf_clear().
void msgbuf_copy | ( | struct msgbuf * | src, |
struct msgbuf * | dst | ||
) |
Definition at line 405 of file subr_msgbuf.c.
References msgbuf_addchar(), msgbuf_getchar(), and src.
Referenced by msgbufinit().
|
static |
Definition at line 150 of file subr_msgbuf.c.
Referenced by msgbuf_addchar(), and msgbuf_addstr().
void msgbuf_duplicate | ( | struct msgbuf * | src, |
struct msgbuf * | dst, | ||
char * | dst_msgptr | ||
) |
Definition at line 418 of file subr_msgbuf.c.
References src.
int msgbuf_getbytes | ( | struct msgbuf * | mbp, |
char * | buf, | ||
int | buflen | ||
) |
Definition at line 311 of file subr_msgbuf.c.
References buf.
Referenced by logread().
int msgbuf_getchar | ( | struct msgbuf * | mbp | ) |
Definition at line 283 of file subr_msgbuf.c.
Referenced by constty_clear(), constty_timeout(), and msgbuf_copy().
int msgbuf_getcount | ( | struct msgbuf * | mbp | ) |
Definition at line 133 of file subr_msgbuf.c.
Referenced by logioctl(), logkqread(), logpoll(), and logread().
void msgbuf_init | ( | struct msgbuf * | mbp, |
void * | ptr, | ||
int | size | ||
) |
Definition at line 66 of file subr_msgbuf.c.
References msgbuf_clear(), and SEQMOD.
Referenced by constty_set(), and msgbuf_reinit().
int msgbuf_peekbytes | ( | struct msgbuf * | mbp, |
char * | buf, | ||
int | buflen, | ||
u_int * | seqp | ||
) |
Definition at line 350 of file subr_msgbuf.c.
References buf.
Referenced by sysctl_kern_msgbuf().
void msgbuf_reinit | ( | struct msgbuf * | mbp, |
void * | ptr, | ||
int | size | ||
) |
Definition at line 86 of file subr_msgbuf.c.
References bootverbose, msgbuf_cksum(), msgbuf_clear(), msgbuf_init(), printf(), and SEQMOD.
Referenced by msgbufinit().
SYSCTL_INT | ( | _kern | , |
OID_AUTO | , | ||
msgbuf_show_timestamp | , | ||
CTLFLAG_RWTUN | , | ||
& | msgbuf_show_timestamp, | ||
0 | , | ||
"Show timestamp in msgbuf" | |||
) |
|
static |
Definition at line 57 of file subr_msgbuf.c.
Referenced by msgbuf_addstr().