extern void bsd_log_lock(void);
extern void bsd_log_unlock(void);
-extern void logwakeup(void);
+extern void logwakeup(struct msgbuf *);
decl_lck_spin_data(extern, oslog_stream_lock)
extern void oslog_streamwakeup(void);
static int msgbufreplay = -1;
va_list args_copy;
+#if DEVELOPMENT || DEBUG
+ if (safe) {
+ bsd_log_lock();
+ }
+#else
bsd_log_lock();
+#endif
if (!safe) {
if (-1 == msgbufreplay) msgbufreplay = msgbufp->msg_bufx;
vprintf_log_locked(format, args_copy);
va_end(args_copy);
+#if DEVELOPMENT || DEBUG
+ if (safe) {
+ bsd_log_unlock();
+ logwakeup(msgbufp);
+ }
+#else
bsd_log_unlock();
-
- if (safe) logwakeup();
+ if (safe) logwakeup(msgbufp);
+#endif
}
static void