Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/ctl.c
Context not available. | |||||
/*num_speed_descr*/0, | /*num_speed_descr*/0, | ||||
}; | }; | ||||
SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); | SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, | ||||
"CAM Target Layer"); | |||||
static int worker_threads = -1; | static int worker_threads = -1; | ||||
SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, | SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, | ||||
&worker_threads, 1, "Number of worker threads"); | &worker_threads, 1, "Number of worker threads"); | ||||
Context not available. | |||||
sysctl_ctx_init(&softc->sysctl_ctx); | sysctl_ctx_init(&softc->sysctl_ctx); | ||||
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, | softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, | ||||
SYSCTL_STATIC_CHILDREN(_kern_cam), OID_AUTO, "ctl", | SYSCTL_STATIC_CHILDREN(_kern_cam), OID_AUTO, "ctl", | ||||
CTLFLAG_RD, 0, "CAM Target Layer"); | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CAM Target Layer"); | ||||
if (softc->sysctl_tree == NULL) { | if (softc->sysctl_tree == NULL) { | ||||
printf("%s: unable to allocate sysctl tree\n", __func__); | printf("%s: unable to allocate sysctl tree\n", __func__); | ||||
Context not available. | |||||
} | } | ||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), | SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), | ||||
OID_AUTO, "ha_role", CTLTYPE_INT | CTLFLAG_RWTUN, | OID_AUTO, "ha_role", | ||||
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | |||||
softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head"); | softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head"); | ||||
if (softc->is_single == 0) { | if (softc->is_single == 0) { | ||||
Context not available. |