Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
async.h File Reference
#include <linux/types.h>
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  async_domain
 

Macros

#define ASYNC_DOMAIN(_name)
 
#define ASYNC_DOMAIN_EXCLUSIVE(_name)
 

Typedefs

typedef u64 async_cookie_t
 
typedef voidasync_func_ptr )(void *data, async_cookie_t cookie)
 

Functions

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

Macro Definition Documentation

#define ASYNC_DOMAIN (   _name)
Value:
struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \
.domain = LIST_HEAD_INIT(_name.domain), \
.count = 0, \
.registered = 1 }

Definition at line 30 of file async.h.

#define ASYNC_DOMAIN_EXCLUSIVE (   _name)
Value:
struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \
.domain = LIST_HEAD_INIT(_name.domain), \
.count = 0, \
.registered = 0 }

Definition at line 40 of file async.h.

Typedef Documentation

Definition at line 18 of file async.h.

typedef void( async_func_ptr)(void *data, async_cookie_t cookie)

Definition at line 19 of file async.h.

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.