Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exec.c
Show First 20 Lines • Show All 1,979 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
int | int | ||||
sbuf_drain_core_output(void *arg, const char *data, int len) | sbuf_drain_core_output(void *arg, const char *data, int len) | ||||
{ | { | ||||
struct coredump_params *cp; | struct coredump_params *cp; | ||||
struct proc *p; | struct proc *p; | ||||
int error, locked; | int error, locked; | ||||
cp = (struct coredump_params *)arg; | cp = arg; | ||||
p = cp->td->td_proc; | p = cp->td->td_proc; | ||||
kib: Cast is not needed, BTW. | |||||
/* | /* | ||||
* Some kern_proc out routines that print to this sbuf may | * Some kern_proc out routines that print to this sbuf may | ||||
* call us with the process lock held. Draining with the | * call us with the process lock held. Draining with the | ||||
* non-sleepable lock held is unsafe. The lock is needed for | * non-sleepable lock held is unsafe. The lock is needed for | ||||
* those routines when dumping a live process. In our case we | * those routines when dumping a live process. In our case we | ||||
* can safely release the lock before draining and acquire | * can safely release the lock before draining and acquire | ||||
* again after. | * again after. | ||||
Show All 16 Lines |
Cast is not needed, BTW.