Lines Matching refs:work_context
597 IOPerfControlWorkContext *work_context = OSDynamicCast(IOPerfControlWorkContext, context); in workSubmitAndBeginWithContext() local
600 .thread_group_id = thread_group_get_id(work_context->thread_group), in workSubmitAndBeginWithContext()
601 .thread_group_data = thread_group_get_machine_data(work_context->thread_group), in workSubmitAndBeginWithContext()
602 .work_data = &work_context->perfcontrol_data, in workSubmitAndBeginWithContext()
603 .work_data_size = sizeof(work_context->perfcontrol_data), in workSubmitAndBeginWithContext()
608 shared->interface.workBegin(device, work_context->id, &state, beginArgs); in workSubmitAndBeginWithContext()
610 work_context->started = true; in workSubmitAndBeginWithContext()
622 IOPerfControlWorkContext *work_context = OSDynamicCast(IOPerfControlWorkContext, context); in workSubmitWithContext() local
624 if (work_context == nullptr) { in workSubmitWithContext()
631 …assertf(!work_context->started, "IOPerfControlWorkContext ID %llu was already started", work_conte… in workSubmitWithContext()
632 …work_context->thread_group == nullptr, "IOPerfControlWorkContext ID %llu has already taken a refco… in workSubmitWithContext()
646 work_context->thread_group = thread_group_retain(thread_group); in workSubmitWithContext()
650 work_context->coal = coalition; in workSubmitWithContext()
654 state.work_data = &work_context->perfcontrol_data; in workSubmitWithContext()
655 state.work_data_size = sizeof(work_context->perfcontrol_data); in workSubmitWithContext()
657 shared->interface.workSubmit(device, work_context->id, &state, args); in workSubmitWithContext()
669 IOPerfControlWorkContext *work_context = OSDynamicCast(IOPerfControlWorkContext, context); in workUpdateWithContext() local
671 if (work_context == nullptr) { in workUpdateWithContext()
675 if (work_context->thread_group == nullptr) { in workUpdateWithContext()
681 .thread_group_id = thread_group_get_id(work_context->thread_group), in workUpdateWithContext()
682 .thread_group_data = thread_group_get_machine_data(work_context->thread_group), in workUpdateWithContext()
683 .work_data = &work_context->perfcontrol_data, in workUpdateWithContext()
684 .work_data_size = sizeof(work_context->perfcontrol_data), in workUpdateWithContext()
687 shared->interface.workUpdate(device, work_context->id, &state, args); in workUpdateWithContext()
695 IOPerfControlWorkContext *work_context = OSDynamicCast(IOPerfControlWorkContext, context); in workBeginWithContext() local
697 if (work_context == nullptr) { in workBeginWithContext()
701 if (work_context->thread_group == nullptr) { in workBeginWithContext()
706 …assertf(!work_context->started, "IOPerfControlWorkContext %llu was already started", work_context-… in workBeginWithContext()
709 .thread_group_id = thread_group_get_id(work_context->thread_group), in workBeginWithContext()
710 .thread_group_data = thread_group_get_machine_data(work_context->thread_group), in workBeginWithContext()
711 .work_data = &work_context->perfcontrol_data, in workBeginWithContext()
712 .work_data_size = sizeof(work_context->perfcontrol_data), in workBeginWithContext()
716 shared->interface.workBegin(device, work_context->id, &state, args); in workBeginWithContext()
718 work_context->started = true; in workBeginWithContext()
726 IOPerfControlWorkContext *work_context = OSDynamicCast(IOPerfControlWorkContext, context); in workEndWithContext() local
728 if (work_context == nullptr) { in workEndWithContext()
732 if (work_context->thread_group == nullptr) { in workEndWithContext()
737 .thread_group_id = thread_group_get_id(work_context->thread_group), in workEndWithContext()
738 .thread_group_data = thread_group_get_machine_data(work_context->thread_group), in workEndWithContext()
739 .work_data = &work_context->perfcontrol_data, in workEndWithContext()
740 .work_data_size = sizeof(work_context->perfcontrol_data), in workEndWithContext()
741 .started = work_context->started, in workEndWithContext()
747 shared->interface.workEndWithResources(device, work_context->id, &state, args, &resources, done); in workEndWithContext()
749 accountResources(work_context->coal, clientData.driverState.device_type, &resources); in workEndWithContext()
752 shared->interface.workEnd(device, work_context->id, &state, args, done); in workEndWithContext()
756 thread_group_release(work_context->thread_group); in workEndWithContext()
757 if (work_context->coal != nullptr) { in workEndWithContext()
758 coalition_release(work_context->coal); in workEndWithContext()
760 work_context->reset(); in workEndWithContext()
762 work_context->started = false; in workEndWithContext()