| /linux/io_uring/ |
| H A D | io-wq.c | 146 static void io_wq_dec_running(struct io_worker *worker); 163 static bool io_worker_get(struct io_worker *worker) in io_worker_get() argument 165 return refcount_inc_not_zero(&worker->ref); in io_worker_get() 168 static void io_worker_release(struct io_worker *worker) in io_worker_release() argument 170 if (refcount_dec_and_test(&worker->ref)) in io_worker_release() 171 complete(&worker->ref_done); in io_worker_release() 185 static inline struct io_wq_acct *io_wq_get_acct(struct io_worker *worker) in io_wq_get_acct() argument 187 return worker->acct; in io_wq_get_acct() 198 struct io_worker *worker = current->worker_private; in io_wq_worker_stopped() local 203 return test_bit(IO_WQ_BIT_EXIT, &worker->wq->state); in io_wq_worker_stopped() [all …]
|
| /linux/kernel/ |
| H A D | kthread.c | 938 void __kthread_init_worker(struct kthread_worker *worker, in __kthread_init_worker() argument 942 memset(worker, 0, sizeof(struct kthread_worker)); in __kthread_init_worker() 943 raw_spin_lock_init(&worker->lock); in __kthread_init_worker() 944 lockdep_set_class_and_name(&worker->lock, key, name); in __kthread_init_worker() 945 INIT_LIST_HEAD(&worker->work_list); in __kthread_init_worker() 946 INIT_LIST_HEAD(&worker->delayed_work_list); in __kthread_init_worker() 967 struct kthread_worker *worker = worker_ptr; in kthread_worker_fn() local 974 WARN_ON(worker->task && worker->task != current); in kthread_worker_fn() 975 worker->task = current; in kthread_worker_fn() 977 if (worker->flags & KTW_FREEZABLE) in kthread_worker_fn() [all …]
|
| H A D | workqueue.c | 217 struct worker *manager; /* L: purely informational */ 350 struct worker *rescuer; /* MD: rescue worker */ 581 #define for_each_pool_worker(worker, pool) \ argument 582 list_for_each_entry((worker), &(pool)->workers, node) \ 972 static inline void worker_set_flags(struct worker *worker, unsigned int flags) in worker_set_flags() argument 974 struct worker_pool *pool = worker->pool; in worker_set_flags() 980 !(worker->flags & WORKER_NOT_RUNNING)) { in worker_set_flags() 984 worker->flags |= flags; in worker_set_flags() 994 static inline void worker_clr_flags(struct worker *worker, unsigned int flags) in worker_clr_flags() argument 996 struct worker_pool *pool = worker->pool; in worker_clr_flags() [all …]
|
| H A D | async.c | 344 struct worker *worker = current_wq_worker(); in current_is_async() local 346 return worker && worker->current_func == async_run_entry_fn; in current_is_async()
|
| H A D | workqueue_internal.h | 24 struct worker { struct 67 static inline struct worker *current_wq_worker(void) in current_wq_worker()
|
| /linux/tools/perf/bench/ |
| H A D | futex-hash.c | 44 struct worker { struct 76 struct worker *w = (struct worker *) arg; in workerfn() 134 struct worker *worker = NULL; in bench_futex_hash() local 162 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 163 if (!worker) in bench_futex_hash() 188 worker[i].tid = i; in bench_futex_hash() 189 worker[i].futex = calloc(params.nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash() 190 if (!worker[i].futex) in bench_futex_hash() 201 ret = pthread_create(&worker[i].thread, &thread_attr, workerfn, in bench_futex_hash() 202 (void *)(struct worker *) &worker[i]); in bench_futex_hash() [all …]
|
| H A D | futex-lock-pi.c | 27 struct worker { struct 35 static struct worker *worker; argument 87 struct worker *w = (struct worker *) arg; in workerfn() 124 static void create_threads(struct worker *w, struct perf_cpu_map *cpu) in create_threads() 141 worker[i].tid = i; in create_threads() 144 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads() 145 if (!worker[i].futex) in create_threads() 148 worker[i].futex = &global_futex; in create_threads() 158 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) { in create_threads() 195 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() [all …]
|
| H A D | epoll-ctl.c | 67 struct worker { struct 132 static inline void do_epoll_op(struct worker *w, int op, int fd) in do_epoll_op() 160 static inline void do_random_epoll_op(struct worker *w) in do_random_epoll_op() 174 struct worker *w = (struct worker *) arg; in workerfn() 204 static void init_fdmaps(struct worker *w, int pct) in init_fdmaps() 223 static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) in do_threads() argument 241 struct worker *w = &worker[i]; in do_threads() 277 (void *)(struct worker *) w); in do_threads() 317 struct worker *worker = NULL; in bench_epoll_ctl() local 352 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() [all …]
|
| H A D | sched-messaging.c | 150 static void create_thread_worker(union messaging_worker *worker, in create_thread_worker() argument 164 ret = pthread_create(&worker->thread, &attr, func, ctx); in create_thread_worker() 171 static void create_process_worker(union messaging_worker *worker, in create_process_worker() argument 175 worker->pid = fork(); in create_process_worker() 177 if (worker->pid == -1) { in create_process_worker() 179 } else if (worker->pid == 0) { in create_process_worker() 185 static void create_worker(union messaging_worker *worker, in create_worker() argument 189 return create_process_worker(worker, ctx, func); in create_worker() 191 return create_thread_worker(worker, ctx, func); in create_worker() 194 static void reap_worker(union messaging_worker *worker) in reap_worker() argument [all …]
|
| H A D | futex-wake.c | 36 static pthread_t *worker; variable 172 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 173 if (!worker) in bench_futex_wake() 195 block_threads(worker, cpu); in bench_futex_wake() 224 ret = pthread_join(worker[i], NULL); in bench_futex_wake() 238 free(worker); in bench_futex_wake()
|
| H A D | futex-requeue.c | 36 static pthread_t *worker; variable 197 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue() 198 if (!worker) in bench_futex_requeue() 228 block_threads(worker, cpu); in bench_futex_requeue() 300 ret = pthread_join(worker[i], NULL); in bench_futex_requeue() 313 free(worker); in bench_futex_requeue()
|
| /linux/drivers/vhost/ |
| H A D | vhost.c | 244 static void vhost_worker_queue(struct vhost_worker *worker, in vhost_worker_queue() argument 252 llist_add(&work->node, &worker->work_list); in vhost_worker_queue() 253 worker->ops->wakeup(worker); in vhost_worker_queue() 259 struct vhost_worker *worker; in vhost_vq_work_queue() local 263 worker = rcu_dereference(vq->worker); in vhost_vq_work_queue() 264 if (worker) { in vhost_vq_work_queue() 266 vhost_worker_queue(worker, work); in vhost_vq_work_queue() 280 static void __vhost_worker_flush(struct vhost_worker *worker) in __vhost_worker_flush() argument 284 if (!worker->attachment_cnt || worker->killed) in __vhost_worker_flush() 290 vhost_worker_queue(worker, &flush.work); in __vhost_worker_flush() [all …]
|
| /linux/drivers/net/wireguard/ |
| H A D | queueing.c | 13 struct multicore_worker __percpu *worker = alloc_percpu(struct multicore_worker); in wg_packet_percpu_multicore_worker_alloc() local 15 if (!worker) in wg_packet_percpu_multicore_worker_alloc() 19 per_cpu_ptr(worker, cpu)->ptr = ptr; in wg_packet_percpu_multicore_worker_alloc() 20 INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function); in wg_packet_percpu_multicore_worker_alloc() 22 return worker; in wg_packet_percpu_multicore_worker_alloc() 35 queue->worker = wg_packet_percpu_multicore_worker_alloc(function, queue); in wg_packet_queue_init() 36 if (!queue->worker) { in wg_packet_queue_init() 45 free_percpu(queue->worker); in wg_packet_queue_free()
|
| /linux/include/linux/ |
| H A D | devm-helpers.h | 48 work_func_t worker) in devm_delayed_work_autocancel() argument 50 INIT_DELAYED_WORK(w, worker); in devm_delayed_work_autocancel() 73 work_func_t worker) in devm_work_autocancel() argument 75 INIT_WORK(w, worker); in devm_work_autocancel()
|
| /linux/samples/seccomp/ |
| H A D | user-trap.c | 208 pid_t worker = 0 , tracer = 0; in main() local 215 worker = fork(); in main() 216 if (worker < 0) { in main() 221 if (worker == 0) { in main() 347 if (waitpid(worker, &status, 0) != worker) { in main() 372 if (worker > 0) in main() 373 kill(worker, SIGKILL); in main()
|
| /linux/drivers/md/ |
| H A D | dm-delay.c | 39 struct task_struct *worker; member 71 return !!dc->worker; in delay_is_fast() 174 if (dc->worker) in delay_dtr() 175 kthread_stop(dc->worker); in delay_dtr() 284 dc->worker = kthread_run(&flush_worker_fn, dc, "dm-delay-flush-worker"); in delay_ctr() 285 if (IS_ERR(dc->worker)) { in delay_ctr() 286 ret = PTR_ERR(dc->worker); in delay_ctr() 287 dc->worker = NULL; in delay_ctr() 335 wake_up_process(dc->worker); in delay_bio()
|
| /linux/drivers/gpu/drm/msm/ |
| H A D | msm_kms.c | 247 if (kms->event_thread[i].worker) in msm_drm_kms_uninit() 248 kthread_destroy_worker(kms->event_thread[i].worker); in msm_drm_kms_uninit() 309 ev_thread->worker = kthread_run_worker(0, "crtc_event:%d", crtc->base.id); in msm_drm_kms_init() 310 if (IS_ERR(ev_thread->worker)) { in msm_drm_kms_init() 311 ret = PTR_ERR(ev_thread->worker); in msm_drm_kms_init() 313 ev_thread->worker = NULL; in msm_drm_kms_init() 317 sched_set_fifo(ev_thread->worker->task); in msm_drm_kms_init()
|
| /linux/drivers/i2c/ |
| H A D | i2c-slave-testunit.c | 50 struct delayed_work worker; member 127 queue_delayed_work(system_long_wq, &tu->worker, in i2c_slave_testunit_slave_cb() 170 struct testunit_data *tu = container_of(work, struct testunit_data, worker.work); in i2c_slave_testunit_work() 247 INIT_DELAYED_WORK(&tu->worker, i2c_slave_testunit_work); in i2c_slave_testunit_probe() 268 cancel_delayed_work_sync(&tu->worker); in i2c_slave_testunit_remove()
|
| /linux/drivers/crypto/caam/ |
| H A D | caamrng.c | 43 struct work_struct worker; member 143 worker); in caam_rng_worker() 161 schedule_work(&ctx->worker); in caam_read() 170 flush_work(&ctx->worker); in caam_cleanup() 241 INIT_WORK(&ctx->worker, caam_rng_worker); in caam_init()
|
| /linux/drivers/hid/ |
| H A D | hid-bigbenff.c | 185 struct work_struct worker; member 194 schedule_work(&bigben->worker); in bigben_schedule_work() 201 struct bigben_device, worker); in bigben_worker() 365 cancel_work_sync(&bigben->worker); in bigben_remove() 414 INIT_WORK(&bigben->worker, bigben_worker); in bigben_probe()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | send_signal_sched_switch.c | 18 static void *worker(void *p) in worker() function 50 err = pthread_create(threads + i, NULL, worker, NULL); in serial_test_send_signal_sched_switch()
|
| /linux/tools/testing/selftests/powerpc/tm/ |
| H A D | tm-vmx-unavail.c | 26 void *worker(void *unused) in worker() function 104 pthread_create(&thread[i], NULL, &worker, NULL); in tm_vmx_unavail_test()
|
| /linux/drivers/platform/olpc/ |
| H A D | olpc-ec.c | 36 struct work_struct worker; member 79 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker() 105 schedule_work(&ec->worker); in olpc_ec_worker() 123 schedule_work(&ec->worker); in queue_ec_descriptor() 416 INIT_WORK(&ec->worker, olpc_ec_worker); in olpc_ec_probe()
|
| /linux/drivers/macintosh/ams/ |
| H A D | ams-core.c | 65 schedule_work(&ams_info.worker); in ams_handle_irq() 185 INIT_WORK(&ams_info.worker, ams_worker); in ams_init() 216 flush_work(&ams_info.worker); in ams_sensor_detach()
|
| /linux/lib/ |
| H A D | test_objpool.c | 66 void (*worker)(struct ot_item *item, int irq); member 165 item->worker(item, 1); in ot_hrtimer_handler() 200 void (*worker)(struct ot_item *, int)) in ot_init_cpu_item() 205 item->worker = worker; in ot_init_cpu_item() 231 item->worker(item, 0); in ot_thread_worker()
|