|
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_RW|CTLFLAG_TUN,&msgbuf_show_timestamp, 0,"Show timestamp in msgbuf") | |
| TUNABLE_INT ("kern.msgbuf_show_timestamp",&msgbuf_show_timestamp) | |
| 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, u_int *const seq, const int c) |
| void | msgbuf_addchar (struct msgbuf *mbp, int c) |
| void | msgbuf_addstr (struct msgbuf *mbp, int pri, 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) |
Variables | |
| static int | msgbuf_show_timestamp = 0 |
| #define MAXPRIBUF (sizeof(intmax_t) * NBBY + 3) |
Definition at line 44 of file subr_msgbuf.c.
Referenced by msgbuf_addstr().
| #define SEQMOD | ( | size | ) | ((size) * 16) |
Definition at line 47 of file subr_msgbuf.c.
Referenced by msgbuf_init(), and msgbuf_reinit().
| void msgbuf_addchar | ( | struct msgbuf * | mbp, |
| int | c | ||
| ) |
Definition at line 165 of file subr_msgbuf.c.
References msgbuf_do_addchar().
Referenced by msgbuf_copy(), and msglogchar().


| void msgbuf_addstr | ( | struct msgbuf * | mbp, |
| int | pri, | ||
| char * | str, | ||
| int | filter_cr | ||
| ) |
Definition at line 183 of file subr_msgbuf.c.
References buf, MAXPRIBUF, msgbuf_do_addchar(), msgbuf_show_timestamp, snprintf(), sprintf(), and time_uptime.
Referenced by msglogstr(), and putbuf().


|
static |
Definition at line 398 of file subr_msgbuf.c.
Referenced by msgbuf_reinit().

| void msgbuf_clear | ( | struct msgbuf * | mbp | ) |
Definition at line 118 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 412 of file subr_msgbuf.c.
References msgbuf_addchar(), and msgbuf_getchar().
Referenced by msgbufinit().


|
static |
Definition at line 149 of file subr_msgbuf.c.
Referenced by msgbuf_addchar(), and msgbuf_addstr().

| int msgbuf_getbytes | ( | struct msgbuf * | mbp, |
| char * | buf, | ||
| int | buflen | ||
| ) |
Definition at line 321 of file subr_msgbuf.c.
Referenced by logread().

| int msgbuf_getchar | ( | struct msgbuf * | mbp | ) |
Definition at line 293 of file subr_msgbuf.c.
Referenced by constty_clear(), constty_timeout(), and msgbuf_copy().

| int msgbuf_getcount | ( | struct msgbuf * | mbp | ) |
Definition at line 131 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 65 of file subr_msgbuf.c.
References msgbuf_clear(), mtx_init(), 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 360 of file subr_msgbuf.c.
Referenced by sysctl_kern_msgbuf().

| void msgbuf_reinit | ( | struct msgbuf * | mbp, |
| void * | ptr, | ||
| int | size | ||
| ) |
Definition at line 85 of file subr_msgbuf.c.
References bootverbose, msgbuf_cksum(), msgbuf_clear(), msgbuf_init(), mtx_init(), printf(), and SEQMOD.
Referenced by msgbufinit().


| SYSCTL_INT | ( | _kern | , |
| OID_AUTO | , | ||
| msgbuf_show_timestamp | , | ||
| CTLFLAG_RW| | CTLFLAG_TUN, | ||
| & | msgbuf_show_timestamp, | ||
| 0 | , | ||
| "Show timestamp in msgbuf" | |||
| ) |
| TUNABLE_INT | ( | "kern.msgbuf_show_timestamp" | , |
| & | msgbuf_show_timestamp | ||
| ) |
|
static |
Definition at line 55 of file subr_msgbuf.c.
Referenced by msgbuf_addstr().