Lines Matching refs:new_task

1490 	task_t                  new_task;  in task_create_internal()  local
1496 new_task = child_task; in task_create_internal()
1498 if (task_ref_count_init(new_task) != KERN_SUCCESS) { in task_create_internal()
1506 task_ref_count_fini(new_task); in task_create_internal()
1510 counter_alloc(&(new_task->faults)); in task_create_internal()
1514 ml_task_set_rop_pid(new_task, parent_task, inherit_memory); in task_create_internal()
1515 ml_task_set_jop_pid(new_task, parent_task, inherit_memory, disable_user_jop); in task_create_internal()
1516 ml_task_set_disable_user_jop(new_task, disable_user_jop); in task_create_internal()
1520 new_task->ledger = ledger; in task_create_internal()
1535 new_task->map = vm_map_fork(ledger, parent_task->map, 0); in task_create_internal()
1537 if (new_task->map != NULL && in task_create_internal()
1539 new_task->deferred_reclamation_metadata = in task_create_internal()
1540 vm_deferred_reclamation_buffer_fork(new_task, in task_create_internal()
1550 counter_free(&new_task->faults); in task_create_internal()
1552 task_ref_count_fini(new_task); in task_create_internal()
1562 new_task->map = new_map; in task_create_internal()
1565 if (new_task->map == NULL) { in task_create_internal()
1566 counter_free(&new_task->faults); in task_create_internal()
1568 task_ref_count_fini(new_task); in task_create_internal()
1572 lck_mtx_init(&new_task->lock, &task_lck_grp, &task_lck_attr); in task_create_internal()
1573 queue_init(&new_task->threads); in task_create_internal()
1574 new_task->suspend_count = 0; in task_create_internal()
1575 new_task->thread_count = 0; in task_create_internal()
1576 new_task->active_thread_count = 0; in task_create_internal()
1577 new_task->user_stop_count = 0; in task_create_internal()
1578 new_task->legacy_stop_count = 0; in task_create_internal()
1579 new_task->active = TRUE; in task_create_internal()
1580 new_task->halting = FALSE; in task_create_internal()
1581 new_task->priv_flags = 0; in task_create_internal()
1582 new_task->t_flags = t_flags; in task_create_internal()
1584 new_task->t_procflags = t_procflags; in task_create_internal()
1585 new_task->t_returnwaitflags = t_returnwaitflags; in task_create_internal()
1586 new_task->returnwait_inheritor = current_thread(); in task_create_internal()
1587 new_task->importance = 0; in task_create_internal()
1588 new_task->crashed_thread_id = 0; in task_create_internal()
1589 new_task->watchports = NULL; in task_create_internal()
1590 new_task->t_rr_ranges = NULL; in task_create_internal()
1592 new_task->bank_context = NULL; in task_create_internal()
1612 new_task->corpse_info = NULL; in task_create_internal()
1616 task_set_uniqueid(new_task); in task_create_internal()
1619 set_task_crash_label(new_task, NULL); in task_create_internal()
1634 task_wakeups_monitor_ctl(new_task, &flags, &rate); in task_create_internal()
1639 task_io_monitor_ctl(new_task, &flags); in task_create_internal()
1642 machine_task_init(new_task, parent_task, inherit_memory); in task_create_internal()
1644 new_task->task_debug = NULL; in task_create_internal()
1647 new_task->task_unnested = FALSE; in task_create_internal()
1648 new_task->task_disconnected_count = 0; in task_create_internal()
1650 queue_init(&new_task->semaphore_list); in task_create_internal()
1651 new_task->semaphores_owned = 0; in task_create_internal()
1653 new_task->vtimers = 0; in task_create_internal()
1655 new_task->shared_region = NULL; in task_create_internal()
1657 new_task->affinity_space = NULL; in task_create_internal()
1660 new_task->t_kpc = 0; in task_create_internal()
1663 new_task->pidsuspended = FALSE; in task_create_internal()
1664 new_task->frozen = FALSE; in task_create_internal()
1665 new_task->changing_freeze_state = FALSE; in task_create_internal()
1666 new_task->rusage_cpu_flags = 0; in task_create_internal()
1667 new_task->rusage_cpu_percentage = 0; in task_create_internal()
1668 new_task->rusage_cpu_interval = 0; in task_create_internal()
1669 new_task->rusage_cpu_deadline = 0; in task_create_internal()
1670 new_task->rusage_cpu_callt = NULL; in task_create_internal()
1672 new_task->suspends_outstanding = 0; in task_create_internal()
1674 recount_task_init(&new_task->tk_recount); in task_create_internal()
1677 new_task->hv_task_target = NULL; in task_create_internal()
1681 queue_init(&new_task->task_watchers); in task_create_internal()
1682 new_task->num_taskwatchers = 0; in task_create_internal()
1683 new_task->watchapplying = 0; in task_create_internal()
1686 new_task->mem_notify_reserved = 0; in task_create_internal()
1687 new_task->memlimit_attrs_reserved = 0; in task_create_internal()
1689 new_task->requested_policy = default_task_requested_policy; in task_create_internal()
1690 new_task->effective_policy = default_task_effective_policy; in task_create_internal()
1692 new_task->task_shared_region_slide = -1; in task_create_internal()
1717 new_task->bsd_info_ro = proc_ro_ref_task(proc_ro, new_task, &task_ro_data); in task_create_internal()
1719 new_task->bsd_info_ro = proc_ro_alloc(NULL, NULL, new_task, &task_ro_data); in task_create_internal()
1722 ipc_task_init(new_task, parent_task); in task_create_internal()
1724 task_importance_init_from_parent(new_task, parent_task); in task_create_internal()
1726 new_task->corpse_vmobject_list = NULL; in task_create_internal()
1732 vm_shared_region_set(new_task, shared_region); in task_create_internal()
1741 task_set_shared_region_id(new_task, shared_region_id); in task_create_internal()
1745 task_set_64Bit_addr(new_task); in task_create_internal()
1749 task_set_64Bit_data(new_task); in task_create_internal()
1753 new_task->all_image_info_addr = parent_task->all_image_info_addr; in task_create_internal()
1754 new_task->all_image_info_size = parent_task->all_image_info_size; in task_create_internal()
1756 new_task->t_flags |= TF_DYLD_ALL_IMAGE_FINAL; in task_create_internal()
1759 new_task->mach_header_vm_address = 0; in task_create_internal()
1762 task_affinity_create(parent_task, new_task); in task_create_internal()
1765 new_task->pset_hint = parent_task->pset_hint = task_choose_pset(parent_task); in task_create_internal()
1767 new_task->task_exc_guard = parent_task->task_exc_guard; in task_create_internal()
1769 new_task->t_flags |= TF_NO_SMT; in task_create_internal()
1773 new_task->t_flags |= TF_USE_PSET_HINT_CLUSTER_TYPE; in task_create_internal()
1777 new_task->t_flags |= TF_TECS; in task_create_internal()
1782 new_task->t_flags |= TF_INSN_COPY_OPTOUT; in task_create_internal()
1786 new_task->priority = BASEPRI_DEFAULT; in task_create_internal()
1787 new_task->max_priority = MAXPRI_USER; in task_create_internal()
1791 task_set_64Bit_addr(new_task); in task_create_internal()
1796 task_set_64Bit_data(new_task); in task_create_internal()
1799 new_task->all_image_info_addr = (mach_vm_address_t)0; in task_create_internal()
1800 new_task->all_image_info_size = (mach_vm_size_t)0; in task_create_internal()
1802 new_task->pset_hint = PROCESSOR_SET_NULL; in task_create_internal()
1804 new_task->task_exc_guard = TASK_EXC_GUARD_NONE; in task_create_internal()
1806 if (new_task == kernel_task) { in task_create_internal()
1807 new_task->priority = BASEPRI_KERNEL; in task_create_internal()
1808 new_task->max_priority = MAXPRI_KERNEL; in task_create_internal()
1810 new_task->priority = BASEPRI_DEFAULT; in task_create_internal()
1811 new_task->max_priority = MAXPRI_USER; in task_create_internal()
1815 bzero(new_task->coalition, sizeof(new_task->coalition)); in task_create_internal()
1817 queue_chain_init(new_task->task_coalition[i]); in task_create_internal()
1821 new_task->task_io_stats = kalloc_data(sizeof(struct io_stat_info), in task_create_internal()
1824 bzero(&(new_task->cpu_time_eqos_stats), sizeof(new_task->cpu_time_eqos_stats)); in task_create_internal()
1825 bzero(&(new_task->cpu_time_rqos_stats), sizeof(new_task->cpu_time_rqos_stats)); in task_create_internal()
1827 bzero(&new_task->extmod_statistics, sizeof(new_task->extmod_statistics)); in task_create_internal()
1829 counter_alloc(&(new_task->pageins)); in task_create_internal()
1830 counter_alloc(&(new_task->cow_faults)); in task_create_internal()
1831 counter_alloc(&(new_task->messages_sent)); in task_create_internal()
1832 counter_alloc(&(new_task->messages_received)); in task_create_internal()
1836 task_rollup_accounting_info(new_task, parent_task); in task_create_internal()
1837 task_store_owned_vmobject_info(new_task, parent_task); in task_create_internal()
1840 new_task->total_runnable_time = 0; in task_create_internal()
1841 new_task->syscalls_mach = 0; in task_create_internal()
1842 new_task->syscalls_unix = 0; in task_create_internal()
1843 new_task->c_switch = 0; in task_create_internal()
1844 new_task->p_switch = 0; in task_create_internal()
1845 new_task->ps_switch = 0; in task_create_internal()
1846 new_task->decompressions = 0; in task_create_internal()
1847 new_task->low_mem_notified_warn = 0; in task_create_internal()
1848 new_task->low_mem_notified_critical = 0; in task_create_internal()
1849 new_task->purged_memory_warn = 0; in task_create_internal()
1850 new_task->purged_memory_critical = 0; in task_create_internal()
1851 new_task->low_mem_privileged_listener = 0; in task_create_internal()
1852 new_task->memlimit_is_active = 0; in task_create_internal()
1853 new_task->memlimit_is_fatal = 0; in task_create_internal()
1854 new_task->memlimit_active_exc_resource = 0; in task_create_internal()
1855 new_task->memlimit_inactive_exc_resource = 0; in task_create_internal()
1856 new_task->task_timer_wakeups_bin_1 = 0; in task_create_internal()
1857 new_task->task_timer_wakeups_bin_2 = 0; in task_create_internal()
1858 new_task->task_gpu_ns = 0; in task_create_internal()
1859 new_task->task_writes_counters_internal.task_immediate_writes = 0; in task_create_internal()
1860 new_task->task_writes_counters_internal.task_deferred_writes = 0; in task_create_internal()
1861 new_task->task_writes_counters_internal.task_invalidated_writes = 0; in task_create_internal()
1862 new_task->task_writes_counters_internal.task_metadata_writes = 0; in task_create_internal()
1863 new_task->task_writes_counters_external.task_immediate_writes = 0; in task_create_internal()
1864 new_task->task_writes_counters_external.task_deferred_writes = 0; in task_create_internal()
1865 new_task->task_writes_counters_external.task_invalidated_writes = 0; in task_create_internal()
1866 new_task->task_writes_counters_external.task_metadata_writes = 0; in task_create_internal()
1868 new_task->task_fs_metadata_writes = 0; in task_create_internal()
1873 new_task->donates_own_pages = FALSE; in task_create_internal()
1878 coalitions_adopt_task(parent_coalitions, new_task); in task_create_internal()
1880 new_task->donates_own_pages = coalition_is_swappable(parent_coalitions[COALITION_TYPE_JETSAM]); in task_create_internal()
1888 coalitions_adopt_task(parent_task->coalition, new_task); in task_create_internal()
1890 …new_task->donates_own_pages = coalition_is_swappable(parent_task->coalition[COALITION_TYPE_JETSAM]… in task_create_internal()
1894 coalitions_adopt_init_task(new_task); in task_create_internal()
1903 (void)coalitions_set_roles(new_task->coalition, new_task, coal_roles); in task_create_internal()
1906 coalitions_adopt_corpse_task(new_task); in task_create_internal()
1909 if (new_task->coalition[COALITION_TYPE_RESOURCE] == COALITION_NULL) { in task_create_internal()
1912 task_set_coalition_member(new_task); in task_create_internal()
1917 task_policy_create(new_task, parent_task); in task_create_internal()
1920 new_task->dispatchqueue_offset = 0; in task_create_internal()
1922 new_task->dispatchqueue_offset = parent_task->dispatchqueue_offset; in task_create_internal()
1925 new_task->task_can_transfer_memory_ownership = FALSE; in task_create_internal()
1926 new_task->task_volatile_objects = 0; in task_create_internal()
1927 new_task->task_nonvolatile_objects = 0; in task_create_internal()
1928 new_task->task_objects_disowning = FALSE; in task_create_internal()
1929 new_task->task_objects_disowned = FALSE; in task_create_internal()
1930 new_task->task_owned_objects = 0; in task_create_internal()
1931 queue_init(&new_task->task_objq); in task_create_internal()
1934 queue_init(&new_task->task_frozen_cseg_q); in task_create_internal()
1937 task_objq_lock_init(new_task); in task_create_internal()
1940 new_task->task_legacy_footprint = FALSE; in task_create_internal()
1941 new_task->task_extra_footprint_limit = FALSE; in task_create_internal()
1942 new_task->task_ios13extended_footprint_limit = FALSE; in task_create_internal()
1944 new_task->task_region_footprint = FALSE; in task_create_internal()
1945 new_task->task_has_crossed_thread_limit = FALSE; in task_create_internal()
1946 new_task->task_thread_limit = 0; in task_create_internal()
1948 new_task->task_can_use_secluded_mem = FALSE; in task_create_internal()
1949 new_task->task_could_use_secluded_mem = FALSE; in task_create_internal()
1950 new_task->task_could_also_use_secluded_mem = FALSE; in task_create_internal()
1951 new_task->task_suppressed_secluded = FALSE; in task_create_internal()
1960 new_task->t_flags &= ~(TF_DARKWAKE_MODE); in task_create_internal()
1962 queue_init(&new_task->io_user_clients); in task_create_internal()
1963 new_task->loadTag = 0; in task_create_internal()
1966 queue_enter(&tasks, new_task, task_t, tasks); in task_create_internal()
1969 task_suspend_internal(new_task); in task_create_internal()
1972 task_ref_hold_proc_task_struct(new_task); in task_create_internal()
2790 task_t new_task, in task_duplicate_map_and_threads() argument
2841 oldmap = new_task->map; in task_duplicate_map_and_threads()
2842 new_task->map = vm_map_fork(new_task->ledger, in task_duplicate_map_and_threads()
2848 if (new_task->map) { in task_duplicate_map_and_threads()
2849 new_task->is_large_corpse = is_large; in task_duplicate_map_and_threads()
2853 vm_map_copy_footprint_ledgers(task, new_task); in task_duplicate_map_and_threads()
2870 new_task->map = oldmap; in task_duplicate_map_and_threads()
2913 …kr = thread_create_with_continuation(new_task, &new_thread, (thread_continue_t)thread_corpse_conti… in task_duplicate_map_and_threads()
2921 new_task->crashed_thread_id = thread_tid(new_thread); in task_duplicate_map_and_threads()
4630 task_t new_task, in task_transfer_turnstile_watchports() argument
4639 if (old_task->watchports == NULL || !new_task->active) { in task_transfer_turnstile_watchports()
4653 new_watchports = task_watchports_alloc_init(new_task, new_thread, portwatch_count); in task_transfer_turnstile_watchports()
4659 is_write_lock(new_task->itk_space); in task_transfer_turnstile_watchports()
4662 if (old_task->watchports == NULL || !new_task->active) { in task_transfer_turnstile_watchports()
4663 is_write_unlock(new_task->itk_space); in task_transfer_turnstile_watchports()
4674 new_task->watchports = new_watchports; in task_transfer_turnstile_watchports()
4687 task_watchport_elem_init(&new_watchports->tw_elem[i], new_task, port); in task_transfer_turnstile_watchports()
4709 new_task->watchports = NULL; in task_transfer_turnstile_watchports()
4712 is_write_unlock(new_task->itk_space); in task_transfer_turnstile_watchports()
10150 task_inherit_conclave(task_t old_task, task_t new_task, void *vnode, int64_t off) in task_inherit_conclave() argument
10172 return exclaves_conclave_inherit(old_task->conclave, old_task, new_task); in task_inherit_conclave()