workqueue.c 437 B

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