Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_prf.c
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | uprintf(const char *fmt, ...) | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
if (pca.tty == NULL) { | if (pca.tty == NULL) { | ||||
sx_sunlock(&proctree_lock); | sx_sunlock(&proctree_lock); | ||||
return (0); | return (0); | ||||
} | } | ||||
pca.flags = TOTTY; | pca.flags = TOTTY; | ||||
pca.p_bufr = NULL; | pca.p_bufr = NULL; | ||||
va_start(ap, fmt); | va_start(ap, fmt); | ||||
tty_lock(pca.tty); | ttydisc_lock(pca.tty); | ||||
sx_sunlock(&proctree_lock); | sx_sunlock(&proctree_lock); | ||||
retval = kvprintf(fmt, putchar, &pca, 10, ap); | retval = kvprintf(fmt, putchar, &pca, 10, ap); | ||||
tty_unlock(pca.tty); | ttydisc_unlock(pca.tty); | ||||
va_end(ap); | va_end(ap); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
/* | /* | ||||
* tprintf and vtprintf print on the controlling terminal associated with the | * tprintf and vtprintf print on the controlling terminal associated with the | ||||
* given session, possibly to the log as well. | * given session, possibly to the log as well. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,123 Lines • Show Last 20 Lines |