MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sysctl_debug_stop_all_proc

Function sysctl_debug_stop_all_proc

freebsd/kern/kern_proc.c:3343–3362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3341#include <sys/mount.h>
3342
3343static int
3344sysctl_debug_stop_all_proc(SYSCTL_HANDLER_ARGS)
3345{
3346 int error, val;
3347
3348 val = 0;
3349 ap_resume = 0;
3350 error = sysctl_handle_int(oidp, &val, 0, req);
3351 if (error != 0 || req->newptr == NULL)
3352 return (error);
3353 if (val != 0) {
3354 stop_all_proc();
3355 syncer_suspend();
3356 while (ap_resume == 0)
3357 ;
3358 syncer_resume();
3359 resume_all_proc();
3360 }
3361 return (0);
3362}
3363
3364SYSCTL_PROC(_debug, OID_AUTO, stop_all_proc, CTLTYPE_INT | CTLFLAG_RW |
3365 CTLFLAG_MPSAFE, __DEVOLATILE(int *, &ap_resume), 0,

Callers

nothing calls this directly

Calls 5

sysctl_handle_intFunction · 0.85
stop_all_procFunction · 0.85
syncer_suspendFunction · 0.85
syncer_resumeFunction · 0.85
resume_all_procFunction · 0.85

Tested by

no test coverage detected