workqueue.c 433 B

123456789101112131415
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <linux/export.h>
  3. #include <linux/workqueue.h>
  4. void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func,
  5. bool onstack, const char *name,
  6. struct lock_class_key *key)
  7. {
  8. __init_work(work, onstack);
  9. work->data = (atomic_long_t)WORK_DATA_INIT();
  10. lockdep_init_map(&work->lockdep_map, name, key, 0);
  11. INIT_LIST_HEAD(&work->entry);
  12. work->func = func;
  13. }