Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/ctl.c
Show All 12 Lines | |||||
error = kproc_kthread_add(ctl_thresh_thread, softc, | error = kproc_kthread_add(ctl_thresh_thread, softc, | ||||
&softc->ctl_proc, &softc->thresh_thread, 0, 0, "ctl", "thresh"); | &softc->ctl_proc, &softc->thresh_thread, 0, 0, "ctl", "thresh"); | ||||
if (error != 0) { | if (error != 0) { | ||||
printf("error creating CTL threshold thread!\n"); | printf("error creating CTL threshold thread!\n"); | ||||
return (error); | return (error); | ||||
} | } | ||||
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) { | ||||
if (ctl_frontend_register(&ha_frontend) != 0) | if (ctl_frontend_register(&ha_frontend) != 0) | ||||
softc->is_single = 1; | softc->is_single = 1; | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
Show All 12 Lines |