/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_kthread.c | 44 linux_kthread_should_stop_task(struct task_struct *task) in linux_kthread_should_stop_task() argument 47 return (atomic_read(&task->kthread_flags) & KTHREAD_SHOULD_STOP_MASK); in linux_kthread_should_stop_task() 58 linux_kthread_stop(struct task_struct *task) in linux_kthread_stop() argument 66 atomic_or(KTHREAD_SHOULD_STOP_MASK, &task->kthread_flags); in linux_kthread_stop() 67 kthread_unpark(task); in linux_kthread_stop() 68 wake_up_process(task); in linux_kthread_stop() 69 wait_for_completion(&task->exited); in linux_kthread_stop() 74 retval = task->task_ret; in linux_kthread_stop() 75 put_task_struct(task); in linux_kthread_stop() 81 linux_kthread_park(struct task_struct *task) in linux_kthread_park() argument [all …]
|
H A D | linux_schedule.c | 42 linux_add_to_sleepqueue(void *wchan, struct task_struct *task, in linux_add_to_sleepqueue() argument 73 linux_schedule_save_interrupt_value(task, ret); in linux_add_to_sleepqueue() 99 wake_up_task(struct task_struct *task, unsigned int state) in wake_up_task() argument 104 sleepq_lock(task); in wake_up_task() 105 if ((atomic_read(&task->state) & state) != 0) { in wake_up_task() 106 set_task_state(task, TASK_WAKING); in wake_up_task() 107 sleepq_signal(task, SLEEPQ_SLEEP, 0, 0); in wake_up_task() 110 sleepq_release(task); in wake_up_task() 115 linux_signal_pending(struct task_struct *task) 120 td = task in linux_signal_pending() 117 linux_signal_pending(struct task_struct * task) linux_signal_pending() argument 132 linux_fatal_signal_pending(struct task_struct * task) linux_fatal_signal_pending() argument 146 linux_signal_pending_state(long state,struct task_struct * task) linux_signal_pending_state() argument 157 linux_send_sig(int signo,struct task_struct * task) linux_send_sig() argument 171 struct task_struct *task; autoremove_wake_function() local 257 struct task_struct *task; linux_wait_event_common() local 294 struct task_struct *task; linux_schedule_timeout() local 361 struct task_struct *task; linux_wait_on_bit_timeout() local 401 struct task_struct *task; linux_wait_on_atomic_t() local 425 linux_wake_up_state(struct task_struct * task,unsigned int state) linux_wake_up_state() argument [all...] |
/freebsd/contrib/ntp/libntp/lib/isc/ |
H A D | task.c | 71 task, isc_thread_self(), (m)) 197 isc__task_purge(isc_task_t *task, void *sender, isc_eventtype_t type, 202 isc__task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first, 206 isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type, 229 isc__task_beginexclusive(isc_task_t *task); 248 push_readyq(isc__taskmgr_t *manager, isc__task_t *task); 297 task_finished(isc__task_t *task) { in task_finished() argument 298 isc__taskmgr_t *manager = task->manager; in task_finished() 300 REQUIRE(EMPTY(task->events)); in task_finished() 301 REQUIRE(EMPTY(task->on_shutdown)); in task_finished() [all …]
|
H A D | ondestroy.c | 42 isc_ondestroy_register(isc_ondestroy_t *ondest, isc_task_t *task, in isc_ondestroy_register() argument 49 REQUIRE(task != NULL); in isc_ondestroy_register() 56 isc_task_attach(task, &thetask); in isc_ondestroy_register() 68 isc_task_t *task; in isc_ondestroy_notify() local 76 task = eventp->ev_sender; in isc_ondestroy_notify() 79 isc_task_sendanddetach(&task, &eventp); in isc_ondestroy_notify()
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | sched.h | 101 #define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid argument 102 #define task_pid(task) ((task)->pid) argument 103 #define task_pid_nr(task) ((task)->pid) argument 104 #define task_pid_vnr(task) ((task)->pid) 108 #define task_euid(task) ((task) 100 task_pid_group_leader(task) global() argument 107 task_euid(task) global() argument 109 get_task_state(task) global() argument 110 set_task_state(task,x) global() argument 111 __set_task_state(task,x) global() argument 116 get_task_struct(struct task_struct * task) get_task_struct() argument 122 put_task_struct(struct task_struct * task) put_task_struct() argument 153 signal_pending(task) global() argument 154 fatal_signal_pending(task) global() argument 155 signal_pending_state(state,task) global() argument 157 send_sig(signo,task,priv) global() argument 165 linux_schedule_save_interrupt_value(struct task_struct * task,int value) linux_schedule_save_interrupt_value() argument 176 linux_schedule_get_interrupt_value(struct task_struct * task) linux_schedule_get_interrupt_value() argument 215 get_task_comm(char * buf,struct task_struct * task) get_task_comm() argument [all...] |
H A D | sched.h | 101 #define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid 102 #define task_pid(task) ((task)->pid) argument 103 #define task_pid_nr(task) ((task)->pid) argument 104 #define task_pid_vnr(task) ((task)->pid) argument 108 #define task_euid(task) ((task) 105 task_pid_vnr(task) global() argument 109 task_euid(task) global() argument 111 get_task_state(task) global() argument 112 set_task_state(task,x) global() argument 113 __set_task_state(task,x) global() argument 118 get_task_struct(struct task_struct * task) get_task_struct() argument 124 put_task_struct(struct task_struct * task) put_task_struct() argument 155 signal_pending(task) global() argument 156 fatal_signal_pending(task) global() argument 157 signal_pending_state(state,task) global() argument 159 send_sig(signo,task,priv) global() argument 167 linux_schedule_save_interrupt_value(struct task_struct * task,int value) linux_schedule_save_interrupt_value() argument 178 linux_schedule_get_interrupt_value(struct task_struct * task) linux_schedule_get_interrupt_value() argument 217 get_task_comm(char * buf,struct task_struct * task) get_task_comm() argument [all...] |
H A D | sched.h | 101 #define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid argument 102 #define task_pid(task) ((task)->pid) argument 103 #define task_pid_nr(task) ((task)->pid) argument 104 #define task_pid_vnr(task) ((task)->pid) 108 #define task_euid(task) ((task) 100 task_pid_group_leader(task) global() argument 107 task_euid(task) global() argument 109 get_task_state(task) global() argument 110 set_task_state(task,x) global() argument 111 __set_task_state(task,x) global() argument 116 get_task_struct(struct task_struct * task) get_task_struct() argument 122 put_task_struct(struct task_struct * task) put_task_struct() argument 153 signal_pending(task) global() argument 154 fatal_signal_pending(task) global() argument 155 signal_pending_state(state,task) global() argument 157 send_sig(signo,task,priv) global() argument 165 linux_schedule_save_interrupt_value(struct task_struct * task,int value) linux_schedule_save_interrupt_value() argument 176 linux_schedule_get_interrupt_value(struct task_struct * task) linux_schedule_get_interrupt_value() argument 215 get_task_comm(char * buf,struct task_struct * task) get_task_comm() argument [all...] |
H A D | kthread.h | 48 struct task_struct *task; member 54 struct task task; member 82 #define kthread_stop(task) linux_kthread_stop(task) argument 84 #define kthread_should_stop_task(task) linux_kthread_should_stop_task(task) argument 85 #define kthread_park(task) linux_kthread_park(task) argument 88 #define kthread_unpark(task) linux_kthread_unpark(task) argument 101 struct task __task; \ 126 TASK_INIT(&work->task, 0, lkpi_kthread_work_fn, work); in kthread_init_work() 134 error = taskqueue_enqueue_flags(worker->tq, &work->task, in kthread_queue_work() 147 taskqueue_cancel(work->tq, &work->task, &pending) != 0) in kthread_cancel_work_sync() [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | task.h | 124 void (*send)(isc_task_t *task, isc_event_t **eventp); 126 unsigned int (*unsend)(isc_task_t *task, void *sender, isc_eventtype_t type, 128 isc_result_t (*onshutdown)(isc_task_t *task, isc_taskaction_t action, 130 void (*shutdown)(isc_task_t *task); 131 void (*setname)(isc_task_t *task, const char *name, void *tag); 132 unsigned int (*purgeevents)(isc_task_t *task, void *sender, 134 unsigned int (*purgerange)(isc_task_t *task, void *sender, 137 isc_result_t (*beginexclusive)(isc_task_t *task); 138 void (*endexclusive)(isc_task_t *task); 139 void (*setprivilege)(isc_task_t *task, isc_boolean_t priv); [all …]
|
H A D | socket.h | 272 void *cbarg, isc_task_t *task, 283 isc_task_t *task, isc_taskaction_t action, 287 isc_task_t *task, isc_taskaction_t action, 290 unsigned int minimum, isc_task_t *task, 292 void (*cancel)(isc_socket_t *sock, isc_task_t *task, 358 isc_task_t *task, 462 isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, 670 isc_task_t *task, isc_taskaction_t action, const void *arg); 693 isc_task_t *task, isc_taskaction_t action, 761 isc_task_t *task, isc_taskaction_t action, const void *arg); [all …]
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | spl_taskq.c | 345 taskq_free(taskq_ent_t *task) in taskq_free() argument 347 taskq_remove(task); in taskq_free() 348 if (refcount_release(&task->tqent_rc)) in taskq_free() 349 uma_zfree(taskq_zone, task); in taskq_free() 389 taskq_ent_t *task = arg; in taskq_run() local 393 task->tqent_func(task->tqent_arg); in taskq_run() 394 taskq_free(task); in taskq_run() 401 taskq_ent_t *task; in taskq_dispatch_delay() local 415 task = uma_zalloc(taskq_zone, mflag); in taskq_dispatch_delay() 416 if (task == NULL) in taskq_dispatch_delay() [all …]
|
/freebsd/sys/cddl/compat/opensolaris/kern/ |
H A D | opensolaris_taskq.c | 114 taskq_ent_t *task = arg; in taskq_run() local 116 task->tqent_func(task->tqent_arg); in taskq_run() 118 uma_zfree(taskq_zone, task); in taskq_run() 124 taskq_ent_t *task; in taskq_dispatch() local 137 task = uma_zalloc(taskq_zone, mflag); in taskq_dispatch() 138 if (task == NULL) in taskq_dispatch() 141 task->tqent_func = func; in taskq_dispatch() 142 task->tqent_arg = arg; in taskq_dispatch() 144 TASK_INIT(&task->tqent_task, prio, taskq_run, task); in taskq_dispatch() 145 taskqueue_enqueue(tq->tq_queue, &task->tqent_task); in taskq_dispatch() [all …]
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_taskdeps.h | 94 static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) { in __kmp_release_deps() argument 97 if (task->is_taskgraph && !(__kmp_tdg_is_recording(task->tdg->tdg_status))) { in __kmp_release_deps() 98 kmp_node_info_t *TaskInfo = &(task->tdg->record_map[task->td_task_id]); in __kmp_release_deps() 102 kmp_node_info_t *successor = &(task->tdg->record_map[successorNumber]); in __kmp_release_deps() 104 if (successor->task != nullptr && npredecessors == 0) { in __kmp_release_deps() 105 __kmp_omp_task(gtid, successor->task, false); in __kmp_release_deps() 113 kmp_depnode_t *node = task->td_depnode; in __kmp_release_deps() 125 if (task->td_dephash) { in __kmp_release_deps() 128 gtid, task)); in __kmp_release_deps() 129 __kmp_dephash_free(thread, task->td_dephash); in __kmp_release_deps() [all …]
|
H A D | kmp_tasking.cpp | 477 static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) { argument 479 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task); 487 __kmpc_give_task(task, __kmp_tid_from_gtid(shadow_gtid)); 528 if (taskdata->td_flags.priority_specified && task->data2.priority > 0 && 530 int pri = KMP_MIN(task->data2.priority, __kmp_max_task_priority); 670 static void __kmp_task_start(kmp_int32 gtid, kmp_task_t *task, argument 672 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task); 721 static inline void __ompt_task_init(kmp_taskdata_t *task, int tid) { argument 723 task->ompt_task_info.task_data.value = 0; 724 task->ompt_task_info.frame.exit_frame = ompt_data_none; [all …]
|
H A D | kmp_taskdeps.cpp | 38 node->dn.task = NULL; // will point to the right task in __kmp_init_node() 222 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task); in __kmp_track_dependence() 224 if (source->dn.task && sink_task) { in __kmp_track_dependence() 260 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task); in __kmp_track_dependence() 274 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task); in __kmp_track_dependence() 287 kmp_base_depnode_t *__kmpc_task_get_depnode(kmp_task_t *task) { in __kmpc_task_get_depnode() argument 288 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task); in __kmpc_task_get_depnode() 292 kmp_depnode_list_t *__kmpc_task_get_successors(kmp_task_t *task) { in __kmpc_task_get_successors() argument 293 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task); in __kmpc_task_get_successors() 299 kmp_task_t *task, kmp_depnode_t *node, in __kmp_depnode_link_successor() argument [all …]
|
H A D | kmp_cancel.cpp | 81 kmp_taskdata_t *task; in __kmpc_cancel() local 84 task = this_thr->th.th_current_task; in __kmpc_cancel() 85 KMP_DEBUG_ASSERT(task); in __kmpc_cancel() 87 taskgroup = task->td_taskgroup; in __kmpc_cancel() 194 kmp_taskdata_t *task; in __kmpc_cancellationpoint() local 197 task = this_thr->th.th_current_task; in __kmpc_cancellationpoint() 198 KMP_DEBUG_ASSERT(task); in __kmpc_cancellationpoint() 200 taskgroup = task->td_taskgroup; in __kmpc_cancellationpoint() 321 kmp_taskdata_t *task; in __kmp_get_cancellation_status() local 323 task = this_thr->th.th_current_task; in __kmp_get_cancellation_status() [all …]
|
/freebsd/sys/kern/ |
H A D | subr_taskqueue.c | 57 struct task *tb_running; 64 STAILQ_HEAD(, task) tq_queue; 66 struct task *tq_hint; 127 task_get_busy(struct taskqueue *queue, struct task *task) in task_get_busy() argument 133 if (tb->tb_running == task) in task_get_busy() 231 taskqueue_enqueue_locked(struct taskqueue *queue, struct task *task, int flags) in taskqueue_enqueue_locked() argument 233 struct task *ins; in taskqueue_enqueue_locked() 234 struct task *prev; in taskqueue_enqueue_locked() 237 KASSERT(task->ta_func != NULL, ("enqueueing task with NULL func")); in taskqueue_enqueue_locked() 242 tb = task_get_busy(queue, task); in taskqueue_enqueue_locked() [all …]
|
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | util.h | 38 struct task_struct *task; member 80 w->task = kthread_run(__mt76_worker_fn, w, in mt76_worker_setup() 83 if (!IS_ERR(w->task)) in mt76_worker_setup() 86 rc = PTR_ERR(w->task); in mt76_worker_setup() 87 w->task = NULL; in mt76_worker_setup() 95 if (w->task == NULL) in mt76_worker_schedule() 100 wake_up_process(w->task); in mt76_worker_schedule() 107 if (w->task == NULL) in mt76_worker_enable() 110 kthread_unpark(w->task); in mt76_worker_enable() 118 if (w->task == NULL) in mt76_worker_disable() [all …]
|
/freebsd/sys/sys/ |
H A D | taskqueue.h | 78 int taskqueue_enqueue(struct taskqueue *queue, struct task *task); 79 int taskqueue_enqueue_flags(struct taskqueue *queue, struct task *task, 86 int taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task); 87 int taskqueue_cancel(struct taskqueue *queue, struct task *task, 91 void taskqueue_drain(struct taskqueue *queue, struct task *task); 127 TASK_INIT_FLAGS(task,priority,func,context,flags) global() argument [all...] |
/freebsd/sys/dev/usb/net/ |
H A D | usb_ethernet.c | 105 struct usb_ether_cfg_task *task; in ue_queue_command() local 117 task = (struct usb_ether_cfg_task *) in ue_queue_command() 121 task->hdr.pm_callback = fn; in ue_queue_command() 122 task->ue = ue; in ue_queue_command() 203 struct usb_ether_cfg_task *task = in ue_attach_post_task() local 205 struct usb_ether *ue = task->ue; in ue_attach_post_task() 369 struct usb_ether_cfg_task *task = in ue_start_task() local 371 struct usb_ether *ue = task->ue; in ue_start_task() 388 struct usb_ether_cfg_task *task = in ue_stop_task() local 390 struct usb_ether *ue = task->ue; in ue_stop_task() [all …]
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | zvol.c | 1532 zvol_task_t *task; in zvol_task_alloc() local 1538 task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP); in zvol_task_alloc() 1539 task->op = op; in zvol_task_alloc() 1540 task->value = value; in zvol_task_alloc() 1542 strlcpy(task->name1, name1, sizeof (task->name1)); in zvol_task_alloc() 1544 strlcpy(task->name2, name2, sizeof (task->name2)); in zvol_task_alloc() 1546 return (task); in zvol_task_alloc() 1550 zvol_task_free(zvol_task_t *task) in zvol_task_free() argument 1552 kmem_free(task, sizeof (zvol_task_t)); in zvol_task_free() 1561 zvol_task_t *task = arg; in zvol_task_cb() local [all …]
|
/freebsd/sys/net80211/ |
H A D | ieee80211_var.h | 148 struct task ic_parent_task; /* deferred parent processing */ 149 struct task ic_promisc_task;/* deferred promisc update */ 150 struct task ic_mcast_task; /* deferred mcast update */ 151 struct task ic_chan_task; /* deferred channel change */ 152 struct task ic_bmiss_task; /* deferred beacon miss hndlr */ 153 struct task ic_chw_task; /* deferred HT CHW update */ 154 struct task ic_restart_task; /* deferred device restart */ 425 struct task iv_nstate_task[NET80211_IV_NSTATE_NUM]; 427 struct task iv_swbmiss_task;/* deferred iv_bmiss call */ 584 struct task iv_wme_task; /* deferred VAP WME update */ [all …]
|
/freebsd/cddl/contrib/opensolaris/lib/pyzfs/common/ |
H A D | util.py | 67 def __init__(self, eno, task=None, why=None): argument 75 self.task = task 80 if self.task: 81 s += self.task + ": "
|
/freebsd/sys/dev/hyperv/vmbus/ |
H A D | vmbus_chanvar.h | 58 struct task ch_task; 59 struct task ch_poll_task; 128 struct task ch_attach_task; /* run in ch_mgmt_tq */ 129 struct task ch_detach_task; /* run in ch_mgmt_tq */
|
/freebsd/sys/contrib/openzfs/config/ |
H A D | kernel-kthread.m4 | 21 dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, 25 dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, 29 dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, 69 struct task_struct *task = NULL; 75 error = dequeue_signal(task, mask, info, type);
|