Lines Matching refs:logbuf
28 whd_logging_t logbuf; variable
36 potential_num_written = vsnprintf (&(logbuf.buffer[logbuf.buffer_write]), in whd_buffer_printf()
37 … (size_t)(LOGGING_BUFFER_SIZE - (logbuf.buffer_write) ) + 1, format, args); in whd_buffer_printf()
39 if (potential_num_written > (int)(LOGGING_BUFFER_SIZE - (logbuf.buffer_write) ) ) in whd_buffer_printf()
44 …memset(&(logbuf.buffer[logbuf.buffer_write]), 0xf, (size_t)(LOGGING_BUFFER_SIZE - (logbuf.buffer_w… in whd_buffer_printf()
46 logbuf.buffer_write = 0; in whd_buffer_printf()
47 potential_num_written = vsnprintf (&(logbuf.buffer[logbuf.buffer_write]), in whd_buffer_printf()
48 … (size_t)(LOGGING_BUFFER_SIZE - (logbuf.buffer_write) ) + 1, format, args); in whd_buffer_printf()
50 logbuf.buffer_write += (unsigned)potential_num_written; in whd_buffer_printf()
51 logbuf.buffer_write %= LOGGING_BUFFER_SIZE; in whd_buffer_printf()
53 if (logbuf.roll_over) in whd_buffer_printf()
54 logbuf.over_write = WHD_TRUE; in whd_buffer_printf()
56 logbuf.roll_over = WHD_TRUE; in whd_buffer_printf()
58 if ( (logbuf.roll_over) && (logbuf.buffer_read < (logbuf.buffer_write) ) ) in whd_buffer_printf()
60 logbuf.buffer_read = logbuf.buffer_write; in whd_buffer_printf()
62 if (logbuf.over_write && (logbuf.buffer_read != (logbuf.buffer_write) ) ) in whd_buffer_printf()
64 logbuf.buffer_read = (logbuf.buffer_write); in whd_buffer_printf()
69 logbuf.buffer_write += (unsigned)potential_num_written; in whd_buffer_printf()
71 if ( (logbuf.buffer_write) >= LOGGING_BUFFER_SIZE ) in whd_buffer_printf()
73 logbuf.buffer_write %= LOGGING_BUFFER_SIZE; in whd_buffer_printf()
75 if (logbuf.roll_over) in whd_buffer_printf()
76 logbuf.over_write = WHD_TRUE; in whd_buffer_printf()
78 logbuf.roll_over = WHD_TRUE; in whd_buffer_printf()
81 if (logbuf.roll_over && (logbuf.buffer_read < logbuf.buffer_write) ) in whd_buffer_printf()
83 logbuf.buffer_read = logbuf.buffer_write; in whd_buffer_printf()
85 if (logbuf.over_write && (logbuf.buffer_read != logbuf.buffer_write) ) in whd_buffer_printf()
87 logbuf.buffer_read = logbuf.buffer_write; in whd_buffer_printf()
97 while (logbuf.roll_over || logbuf.over_write || (logbuf.buffer_read != logbuf.buffer_write) ) in whd_print_logbuffer()
99 logbuf.roll_over = logbuf.over_write = WHD_FALSE; in whd_print_logbuffer()
101 while (logbuf.buffer[logbuf.buffer_read] == 0xf) in whd_print_logbuffer()
103 logbuf.buffer_read = (logbuf.buffer_read + 1) % LOGGING_BUFFER_SIZE; in whd_print_logbuffer()
106 putchar(logbuf.buffer[logbuf.buffer_read]); in whd_print_logbuffer()
107 logbuf.buffer_read = (logbuf.buffer_read + 1) % LOGGING_BUFFER_SIZE; in whd_print_logbuffer()