Lines Matching defs:task

28 #include <kern/task.h>
218 * Keeps track of all system, task, and thread-level reservations (both active and
221 * We track them all here (rather than in their respective task or thread only)
223 * every task and thread) to determine if/when a new reservation would
702 * Since this member is a union, we only need to set either the task
705 resv->task = TASK_NULL;
743 * Used to place reservation into one of the system, task, and thread queues
768 if(current_task() == resv->task) {
800 * This method will inspect the task/thread of the reservation to see if it
801 * matches the new incoming one (for thread/task reservations only). Will only
802 * return TRUE if the task/thread matches.
845 * Follow similar semantics for task scope.
849 (tmp->task == resv->task);
900 * If the parent task just dropped its reservation, iterate the thread
925 * given task, and M is the number of thread reservations in our system.
927 static void pmc_internal_update_task_flag(task_t task, boolean_t newFlag) {
928 assert(task);
932 OSBitOrAtomic(TASK_PMC_FLAG, &task->t_chud);
934 OSBitAndAtomic(~(TASK_PMC_FLAG), &task->t_chud);
937 task_lock(task);
939 queue_iterate(&task->threads, thread, thread_t, task_threads) {
940 /* propagate the task's mask down to each thread */
944 task_unlock(task);
976 assert(resv->task);
984 /* update the task mask, and propagate it to existing threads */
985 pmc_internal_update_task_flag(resv->task, TRUE);
993 * Works the same as a task-switched counter, only at
1089 /* Recalculate task's counter mask */
1090 pmc_internal_update_task_flag(resv->task, FALSE);
2400 * configuration object, for counting when the given @task is running on any
2413 task_t task, pmc_reservation_t *reservation) {
2415 if(!pmc || !config || !reservation || !task) {
2432 resv->task = task;
2462 * task scope.
2792 * state associated with @oldThread (and the task to which @oldThread belongs),
2793 * as well as to restore all pmc state associated with @newThread (and the task
2815 if ((resv->task == oldThread->task) && pmc_accessible_from_core(resv->pmc, cpuNum)) {
2832 if ((resv->task == newThread->task) && pmc_accessible_from_core(resv->pmc, cpuNum)) {
2921 pmc_config_t config __unused, task_t task __unused,