static void rwsched_instance_free_int(rwsched_instance_t *instance) { // Validate input paraemters RW_CF_TYPE_VALIDATE(instance, rwsched_instance_ptr_t); //FIXME if (!g_atomic_int_dec_and_test(&instance->ref_cnt)) { return; } #if 1 RW_FREE_TYPE(instance->default_rwqueue, rwsched_dispatch_queue_t); RW_FREE_TYPE(instance->main_rwqueue, rwsched_dispatch_queue_t); long i; for (i=0; i<RWSCHED_DISPATCH_QUEUE_GLOBAL_CT; i++) { instance->global_rwqueue[i].rwq->header.libdispatch_object._dq = NULL; RW_FREE_TYPE(instance->global_rwqueue[i].rwq, rwsched_dispatch_queue_t); instance->global_rwqueue[i].rwq = NULL; } ck_pr_dec_32(&g_rwsched_instance_count); if (instance->rwlog_instance) { rwlog_close(instance->rwlog_instance, FALSE); } //NO-FREE RW_CF_TYPE_FREE(instance, rwsched_instance_ptr_t); #endif }
ValidationStatus validate_dom(XMLDocument* dom, rw_uagent::Instance* inst) { RW_ASSERT (dom); rwlog_ctx_t* log = nullptr; if (!inst) { log = rwlog_init("RW.XMLDomValidation"); } else { log = inst->rwlog(); } XMLNode* root_xml_node = dom->get_root_node(); ValidationStatus result = walk_xml_dom_and_validate(dom, root_xml_node, log); if (!inst) { rwlog_close(log, false); } return result; }