XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs
workqueue.h File Reference
#include <linux/timer.h>
Include dependency graph for workqueue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  work_struct
 
struct  workqueue_struct
 
struct  delayed_work
 

Macros

#define INIT_WORK(_work, _func)
 
#define schedule_work(work)    do { if ((work)->func) (work)->func(work); } while (0)
 
#define queue_work(wq, work)    do { if ((work)->func) (work)->func(work); } while (0)
 
#define flush_work(work)   do {} while (0)
 
#define cancel_work_sync(work)   do {} while (0)
 
#define flush_workqueue(wq)   do {} while (0)
 
#define destroy_workqueue(wq)   do {} while (0)
 
#define create_singlethread_workqueue(name)    alloc_ordered_workqueue(name, 0)
 
#define container_of_work(ptr, type, member)    container_of(ptr, type, member)
 
#define INIT_DELAYED_WORK(_dwork, _func)
 
#define to_delayed_work(ptr)    container_of(ptr, struct delayed_work, work)
 

Typedefs

typedef void(* work_func_t) (struct work_struct *work)
 

Macro Definition Documentation

◆ cancel_work_sync

#define cancel_work_sync (   work)    do {} while (0)

◆ container_of_work

#define container_of_work (   ptr,
  type,
  member 
)     container_of(ptr, type, member)

◆ create_singlethread_workqueue

#define create_singlethread_workqueue (   name)     alloc_ordered_workqueue(name, 0)

◆ destroy_workqueue

#define destroy_workqueue (   wq)    do {} while (0)

◆ flush_work

#define flush_work (   work)    do {} while (0)

◆ flush_workqueue

#define flush_workqueue (   wq)    do {} while (0)

◆ INIT_DELAYED_WORK

#define INIT_DELAYED_WORK (   _dwork,
  _func 
)
Value:
do { \
INIT_WORK(&(_dwork)->work, _func); \
timer_setup(&(_dwork)->timer, NULL, 0); \
(_dwork)->wq = NULL; \
} while (0)
#define NULL
Definition actypes.h:561

◆ INIT_WORK

#define INIT_WORK (   _work,
  _func 
)
Value:
do { \
(_work)->func = (_func); \
(_work)->pending = 0; \
(_work)->data = NULL; \
} while (0)

◆ queue_work

#define queue_work (   wq,
  work 
)     do { if ((work)->func) (work)->func(work); } while (0)

◆ schedule_work

#define schedule_work (   work)     do { if ((work)->func) (work)->func(work); } while (0)

◆ to_delayed_work

#define to_delayed_work (   ptr)     container_of(ptr, struct delayed_work, work)

Typedef Documentation

◆ work_func_t

typedef void(* work_func_t) (struct work_struct *work)