Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
async.c File Reference
#include <linux/async.h>
#include <linux/atomic.h>
#include <linux/ktime.h>
#include <linux/export.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/workqueue.h>

Go to the source code of this file.

Data Structures

struct  async_entry
 

Macros

#define MAX_WORK   32768
 

Functions

async_cookie_t async_schedule (async_func_ptr *ptr, void *data)
 
 EXPORT_SYMBOL_GPL (async_schedule)
 
async_cookie_t async_schedule_domain (async_func_ptr *ptr, void *data, struct async_domain *running)
 
 EXPORT_SYMBOL_GPL (async_schedule_domain)
 
void async_synchronize_full (void)
 
 EXPORT_SYMBOL_GPL (async_synchronize_full)
 
void async_unregister_domain (struct async_domain *domain)
 
 EXPORT_SYMBOL_GPL (async_unregister_domain)
 
void async_synchronize_full_domain (struct async_domain *domain)
 
 EXPORT_SYMBOL_GPL (async_synchronize_full_domain)
 
void async_synchronize_cookie_domain (async_cookie_t cookie, struct async_domain *running)
 
 EXPORT_SYMBOL_GPL (async_synchronize_cookie_domain)
 
void async_synchronize_cookie (async_cookie_t cookie)
 
 EXPORT_SYMBOL_GPL (async_synchronize_cookie)
 

Macro Definition Documentation

#define MAX_WORK   32768

Definition at line 62 of file async.c.

Function Documentation

async_cookie_t async_schedule ( async_func_ptr ptr,
void data 
)

async_schedule - schedule a function for asynchronous execution : function to execute asynchronously : data pointer to pass to the function

Returns an async_cookie_t that may be used for checkpointing later. Note: This function may be called from atomic or non-atomic contexts.

Definition at line 213 of file async.c.

async_cookie_t async_schedule_domain ( async_func_ptr ptr,
void data,
struct async_domain running 
)

async_schedule_domain - schedule a function for asynchronous execution within a certain domain : function to execute asynchronously : data pointer to pass to the function : running list for the domain

Returns an async_cookie_t that may be used for checkpointing later. may be used in the async_synchronize_*_domain() functions to wait within a certain synchronization domain rather than globally. A synchronization domain is specified via the running queue to use. Note: This function may be called from atomic or non-atomic contexts.

Definition at line 231 of file async.c.

void async_synchronize_cookie ( async_cookie_t  cookie)

async_synchronize_cookie - synchronize asynchronous function calls with cookie checkpointing : async_cookie_t to use as checkpoint

This function waits until all asynchronous function calls prior to have been done.

Definition at line 335 of file async.c.

void async_synchronize_cookie_domain ( async_cookie_t  cookie,
struct async_domain running 
)

async_synchronize_cookie_domain - synchronize asynchronous function calls within a certain domain with cookie checkpointing : async_cookie_t to use as checkpoint : running list to synchronize on

This function waits until all asynchronous function calls for the synchronization domain specified by running list submitted prior to have been done.

Definition at line 303 of file async.c.

void async_synchronize_full ( void  )

async_synchronize_full - synchronize all asynchronous function calls

This function waits until all asynchronous function calls have been done.

Definition at line 243 of file async.c.

void async_synchronize_full_domain ( struct async_domain domain)

async_synchronize_full_domain - synchronize all asynchronous function within a certain domain : running list to synchronize on

This function waits until all asynchronous function calls for the synchronization domain specified by the running list have been done.

Definition at line 288 of file async.c.

void async_unregister_domain ( struct async_domain domain)

async_unregister_domain - ensure no more anonymous waiters on this domain : idle domain to flush out of any async_synchronize_full instances

async_synchronize_{cookie|full}_domain() are not flushed since callers of these routines should know the lifetime of

Prefer ASYNC_DOMAIN_EXCLUSIVE() declarations over flushing

Definition at line 269 of file async.c.

EXPORT_SYMBOL_GPL ( async_schedule  )
EXPORT_SYMBOL_GPL ( async_schedule_domain  )
EXPORT_SYMBOL_GPL ( async_synchronize_full  )
EXPORT_SYMBOL_GPL ( async_unregister_domain  )
EXPORT_SYMBOL_GPL ( async_synchronize_full_domain  )
EXPORT_SYMBOL_GPL ( async_synchronize_cookie_domain  )
EXPORT_SYMBOL_GPL ( async_synchronize_cookie  )