Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_msgbuf.c
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
void | void | ||||
msgbuf_addstr(struct msgbuf *mbp, int pri, char *str, int filter_cr) | msgbuf_addstr(struct msgbuf *mbp, int pri, char *str, int filter_cr) | ||||
{ | { | ||||
u_int seq; | u_int seq; | ||||
size_t len, prefix_len; | size_t len, prefix_len; | ||||
char prefix[MAXPRIBUF]; | char prefix[MAXPRIBUF]; | ||||
char buf[32]; | char buf[32]; | ||||
int nl, i, j, needtime; | int i, j, needtime; | ||||
len = strlen(str); | len = strlen(str); | ||||
prefix_len = 0; | prefix_len = 0; | ||||
nl = 0; | |||||
/* If we have a zero-length string, no need to do anything. */ | /* If we have a zero-length string, no need to do anything. */ | ||||
if (len == 0) | if (len == 0) | ||||
return; | return; | ||||
mtx_lock_spin(&mbp->msg_lock); | mtx_lock_spin(&mbp->msg_lock); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |