Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
llist.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/llist.h>

Go to the source code of this file.

Functions

bool llist_add_batch (struct llist_node *new_first, struct llist_node *new_last, struct llist_head *head)
 
 EXPORT_SYMBOL_GPL (llist_add_batch)
 
struct llist_nodellist_del_first (struct llist_head *head)
 
 EXPORT_SYMBOL_GPL (llist_del_first)
 

Function Documentation

EXPORT_SYMBOL_GPL ( llist_add_batch  )
EXPORT_SYMBOL_GPL ( llist_del_first  )
bool llist_add_batch ( struct llist_node new_first,
struct llist_node new_last,
struct llist_head head 
)

llist_add_batch - add several linked entries in batch : first entry in batch to be added : last entry in batch to be added : the head for your lock-less list

Return whether list is empty before adding.

Definition at line 39 of file llist.c.

struct llist_node* llist_del_first ( struct llist_head head)
read

llist_del_first - delete the first entry of lock-less list : the head for your lock-less list

If list is empty, return NULL, otherwise, return the first entry deleted, this is the newest added one.

Only one llist_del_first user can be used simultaneously with multiple llist_add users without lock. Because otherwise llist_del_first, llist_add, llist_add (or llist_del_all, llist_add, llist_add) sequence in another user may change ->first->next, but keep ->first. If multiple consumers are needed, please use llist_del_all or use lock between consumers.

Definition at line 71 of file llist.c.