Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c
Context not available. | |||||
static MALLOC_DEFINE(M_KSTAT, "kstat_data", "Kernel statistics"); | static MALLOC_DEFINE(M_KSTAT, "kstat_data", "Kernel statistics"); | ||||
SYSCTL_ROOT_NODE(OID_AUTO, kstat, CTLFLAG_RW, 0, "Kernel statistics"); | SYSCTL_ROOT_NODE(OID_AUTO, kstat, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"Kernel statistics"); | |||||
kstat_t * | kstat_t * | ||||
kstat_create(char *module, int instance, char *name, char *class, uchar_t type, | kstat_create(char *module, int instance, char *name, char *class, uchar_t type, | ||||
Context not available. | |||||
*/ | */ | ||||
sysctl_ctx_init(&ksp->ks_sysctl_ctx); | sysctl_ctx_init(&ksp->ks_sysctl_ctx); | ||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, | root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, | ||||
SYSCTL_STATIC_CHILDREN(_kstat), OID_AUTO, module, CTLFLAG_RW, 0, | SYSCTL_STATIC_CHILDREN(_kstat), OID_AUTO, module, | ||||
""); | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, ""); | ||||
if (root == NULL) { | if (root == NULL) { | ||||
printf("%s: Cannot create kstat.%s tree!\n", __func__, module); | printf("%s: Cannot create kstat.%s tree!\n", __func__, module); | ||||
sysctl_ctx_free(&ksp->ks_sysctl_ctx); | sysctl_ctx_free(&ksp->ks_sysctl_ctx); | ||||
Context not available. | |||||
return (NULL); | return (NULL); | ||||
} | } | ||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root), | root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root), | ||||
OID_AUTO, class, CTLFLAG_RW, 0, ""); | OID_AUTO, class, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, ""); | ||||
if (root == NULL) { | if (root == NULL) { | ||||
printf("%s: Cannot create kstat.%s.%s tree!\n", __func__, | printf("%s: Cannot create kstat.%s.%s tree!\n", __func__, | ||||
module, class); | module, class); | ||||
Context not available. | |||||
return (NULL); | return (NULL); | ||||
} | } | ||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root), | root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root), | ||||
OID_AUTO, name, CTLFLAG_RW, 0, ""); | OID_AUTO, name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, ""); | ||||
if (root == NULL) { | if (root == NULL) { | ||||
printf("%s: Cannot create kstat.%s.%s.%s tree!\n", __func__, | printf("%s: Cannot create kstat.%s.%s.%s tree!\n", __func__, | ||||
module, class, name); | module, class, name); | ||||
Context not available. |