/*ARGSUSED*/ static int sdt_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) { sdt_provider_t *prov; switch (cmd) { case DDI_DETACH: break; case DDI_SUSPEND: return (DDI_SUCCESS); default: return (DDI_FAILURE); } for (prov = sdt_providers; prov->sdtp_name != NULL; prov++) { if (prov->sdtp_id != DTRACE_PROVNONE) { if (dtrace_unregister(prov->sdtp_id) != 0) return (DDI_FAILURE); prov->sdtp_id = DTRACE_PROVNONE; } } dtrace_invop_remove(sdt_invop); kmem_free(sdt_probetab, sdt_probetab_size * sizeof (sdt_probe_t *)); return (DDI_SUCCESS); }
static void fbt_cleanup(dev_info_t *devi) { dtrace_invop_remove(fbt_invop); ddi_remove_minor_node(devi, NULL); kmem_free(fbt_probetab, fbt_probetab_size * sizeof (fbt_probe_t *)); fbt_probetab = NULL; fbt_probetab_mask = 0; }
static void instr_cleanup(dev_info_t *devi) { dtrace_invop_remove(instr_invop); if (instr_id) dtrace_unregister(instr_id); // ddi_remove_minor_node(devi, NULL); if (instr_probetab) kmem_free(instr_probetab, instr_probetab_size * sizeof (instr_probe_t *)); instr_probetab = NULL; instr_probetab_mask = 0; }
static void fbt_cleanup(dev_info_t *devi) { if (invop_loaded) dtrace_invop_remove(fbt_invop); if (fbt_id) dtrace_unregister(fbt_id); // ddi_remove_minor_node(devi, NULL); if (fbt_probetab) kmem_free(fbt_probetab, fbt_probetab_size * sizeof (fbt_probe_t *)); fbt_probetab = NULL; fbt_probetab_mask = 0; }
/*ARGSUSED*/ static int sdt_detach(void) { sdt_provider_t *prov; for (prov = sdt_providers; prov->sdtp_name != NULL; prov++) { if (prov->sdtp_id != DTRACE_PROVNONE) { if (dtrace_unregister(prov->sdtp_id) != 0) return (DDI_FAILURE); prov->sdtp_id = DTRACE_PROVNONE; } } dtrace_invop_remove(sdt_invop); kmem_free(sdt_probetab, sdt_probetab_size * sizeof (sdt_probe_t *)); return (DDI_SUCCESS); }