150 len, 0LL, UIO_SYSSPACE, FAPPEND,
151 (rlim64_t)LOG_HIWAT, kcred, &resid);
152 tty_rele(sp);
153 }
154 }
155
156 if (on_intr && !panicstr) {
157 (void) putq(log_intrq, mp);
158 softcall((void (*)(void *))log_flushq, log_intrq);
159 } else {
160 log_sendmsg(mp, zoneid);
161 }
162 out:
163 if (panicbuf_log + len < PANICBUFSIZE) {
164 uint32_t old, new;
165 do {
166 old = panicbuf_index;
167 new = old + len;
168 if (new >= PANICBUFSIZE)
169 new = panicbuf_log + len;
170 } while (cas32(&panicbuf_index, old, new) != old);
171 bcopy(body, &panicbuf[new - len], len);
172 }
173 if (bufp != buf)
174 kmem_free(bufp, bufsize);
175 }
176
177 void
178 vzprintf(zoneid_t zoneid, const char *fmt, va_list adx)
179 {
180 cprintf(fmt, adx, SL_CONSOLE | SL_NOTE, "", "", caller(), 0, 0, 0,
181 zoneid);
182 }
183
184 void
185 vprintf(const char *fmt, va_list adx)
186 {
187 vzprintf(GLOBAL_ZONEID, fmt, adx);
188 }
189
190 /*PRINTFLIKE1*/
|
150 len, 0LL, UIO_SYSSPACE, FAPPEND,
151 (rlim64_t)LOG_HIWAT, kcred, &resid);
152 tty_rele(sp);
153 }
154 }
155
156 if (on_intr && !panicstr) {
157 (void) putq(log_intrq, mp);
158 softcall((void (*)(void *))log_flushq, log_intrq);
159 } else {
160 log_sendmsg(mp, zoneid);
161 }
162 out:
163 if (panicbuf_log + len < PANICBUFSIZE) {
164 uint32_t old, new;
165 do {
166 old = panicbuf_index;
167 new = old + len;
168 if (new >= PANICBUFSIZE)
169 new = panicbuf_log + len;
170 } while (atomic_cas_32(&panicbuf_index, old, new) != old);
171 bcopy(body, &panicbuf[new - len], len);
172 }
173 if (bufp != buf)
174 kmem_free(bufp, bufsize);
175 }
176
177 void
178 vzprintf(zoneid_t zoneid, const char *fmt, va_list adx)
179 {
180 cprintf(fmt, adx, SL_CONSOLE | SL_NOTE, "", "", caller(), 0, 0, 0,
181 zoneid);
182 }
183
184 void
185 vprintf(const char *fmt, va_list adx)
186 {
187 vzprintf(GLOBAL_ZONEID, fmt, adx);
188 }
189
190 /*PRINTFLIKE1*/
|