void release_service(struct service_entry *service) { if (InterlockedDecrement(&service->ref_count) == 0 && is_marked_for_delete(service)) { scmdatabase_lock_exclusive(service->db); service_lock_exclusive(service); scmdatabase_remove_service(service->db, service); service_unlock(service); scmdatabase_unlock(service->db); free_service_entry(service); } }
void release_service(struct service_entry *service) { if (InterlockedDecrement(&service->ref_count) == 0 && is_marked_for_delete(service)) free_service_entry(service); }