VSF Documented
Data Structures | Macros | Typedefs | Functions | Variables
workqueue.h File Reference
#include "kernel/vsf_kernel.h"
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  work_struct
 
struct  delayed_work
 

Macros

#define INIT_WORK(__WORK, __FUNC)
 
#define INIT_DELAYED_WORK(__DWORK, __FUNC)   INIT_WORK(&(__DWORK)->work, (__FUNC))
 
#define alloc_ordered_workqueue(__fmt, __flags, ...)    alloc_workqueue(__fmt, __flags, 1, ##__VA_ARGS__)
 
#define create_singlethread_workqueue(__name)    alloc_ordered_workqueue("%s", 0, (__name))
 
#define create_workqueue(__name)    alloc_workqueue("%s", 0, 1, (__name))
 

Typedefs

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

Functions

struct workqueue_structalloc_workqueue (const char *fmt, unsigned int flags, int max_active,...)
 
void destroy_workqueue (struct workqueue_struct *wq)
 
bool queue_delayed_work (struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay)
 
bool mod_delayed_work (struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay)
 
bool queue_work (struct workqueue_struct *wq, struct work_struct *work)
 
void flush_workqueue (struct workqueue_struct *wq)
 
bool flush_work (struct work_struct *work)
 
bool cancel_work (struct work_struct *work)
 
bool cancel_work_sync (struct work_struct *work)
 
bool flush_delayed_work (struct delayed_work *dwork)
 
bool cancel_delayed_work (struct delayed_work *dwork)
 
bool cancel_delayed_work_sync (struct delayed_work *dwork)
 

Variables

struct workqueue_structsystem_wq
 

Macro Definition Documentation

◆ INIT_WORK

#define INIT_WORK (   __WORK,
  __FUNC 
)
Value:
do { \
(__WORK)->func = (__FUNC); \
vsf_dlist_init_node(struct work_struct, entry, (__WORK)); \
} while (0)
Definition workqueue.h:15

◆ INIT_DELAYED_WORK

#define INIT_DELAYED_WORK (   __DWORK,
  __FUNC 
)    INIT_WORK(&(__DWORK)->work, (__FUNC))

◆ alloc_ordered_workqueue

#define alloc_ordered_workqueue (   __fmt,
  __flags,
  ... 
)     alloc_workqueue(__fmt, __flags, 1, ##__VA_ARGS__)

◆ create_singlethread_workqueue

#define create_singlethread_workqueue (   __name)     alloc_ordered_workqueue("%s", 0, (__name))

◆ create_workqueue

#define create_workqueue (   __name)     alloc_workqueue("%s", 0, 1, (__name))

Typedef Documentation

◆ work_func_t

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

Function Documentation

◆ alloc_workqueue()

struct workqueue_struct * alloc_workqueue ( const char *  fmt,
unsigned int  flags,
int  max_active,
  ... 
)
extern

◆ destroy_workqueue()

void destroy_workqueue ( struct workqueue_struct wq)
extern

◆ queue_delayed_work()

bool queue_delayed_work ( struct workqueue_struct wq,
struct delayed_work dwork,
unsigned long  delay 
)
extern

◆ mod_delayed_work()

bool mod_delayed_work ( struct workqueue_struct wq,
struct delayed_work dwork,
unsigned long  delay 
)
extern

◆ queue_work()

bool queue_work ( struct workqueue_struct wq,
struct work_struct work 
)
extern

◆ flush_workqueue()

void flush_workqueue ( struct workqueue_struct wq)
extern

◆ flush_work()

bool flush_work ( struct work_struct work)
extern

◆ cancel_work()

bool cancel_work ( struct work_struct work)
extern

◆ cancel_work_sync()

bool cancel_work_sync ( struct work_struct work)
extern

◆ flush_delayed_work()

bool flush_delayed_work ( struct delayed_work dwork)
extern

◆ cancel_delayed_work()

bool cancel_delayed_work ( struct delayed_work dwork)
extern

◆ cancel_delayed_work_sync()

bool cancel_delayed_work_sync ( struct delayed_work dwork)
extern

Variable Documentation

◆ system_wq

struct workqueue_struct* system_wq
extern