p2  0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bags.c File Reference

Non-blocking synchronization.with lock-free concurrent bags (c) 2011 Håkan Sundell, Anders Gidenstam, Marina Papatriantafilou, Philippas Tsigas See http://www.cse.chalmers.se/~tsigas/papers/Lock%20Free%20Bag%20SPAA11.pdf. More...

Go to the source code of this file.

Data Structures

struct  blockp_t
 
struct  block_t
 

Functions

void Mark1Block (block_t *block)
 
block_tNewBlock ()
 
void NotifyAll (block_t *block)
 
void NotifyStart (block_t *block, int Id)
 
bool NotifyCheck (block_t *block, int Id)
 
void InitBag ()
 
void InitThread ()
 
void Add (void *item)
 
void * TryRemoveAny ()
 
void * TryStealBlock (int round)
 
block_tNextStealBlock (block_t *block)
 

Variables

block_tglobalHeadBlock [NR_THREADS]
 
block_tthreadBlock
 
block_t stealBlock
 
block_t stealPrev
 
bool foundAdd
 
int threadHead
 
int stealHead
 
int stealIndex
 
int threadID
 

Detailed Description

Non-blocking synchronization.with lock-free concurrent bags (c) 2011 Håkan Sundell, Anders Gidenstam, Marina Papatriantafilou, Philippas Tsigas See http://www.cse.chalmers.se/~tsigas/papers/Lock%20Free%20Bag%20SPAA11.pdf.

Definition in file bags.c.

Function Documentation

void Mark1Block ( block_t block)

Definition at line 22 of file bags.c.

block_t* NewBlock ( )

Definition at line 28 of file bags.c.

void NotifyAll ( block_t block)

Definition at line 35 of file bags.c.

void NotifyStart ( block_t block,
int  Id 
)

Definition at line 39 of file bags.c.

bool NotifyCheck ( block_t block,
int  Id 
)

Definition at line 45 of file bags.c.

void InitBag ( )

Definition at line 49 of file bags.c.

void InitThread ( )

Definition at line 52 of file bags.c.

void Add ( void *  item)

Definition at line 60 of file bags.c.

void* TryRemoveAny ( )

Definition at line 82 of file bags.c.

void* TryStealBlock ( int  round)

Definition at line 141 of file bags.c.

block_t* NextStealBlock ( block_t block)

Definition at line 178 of file bags.c.

Variable Documentation

block_t* globalHeadBlock[NR_THREADS]

Definition at line 8 of file bags.c.

block_t* threadBlock

Definition at line 11 of file bags.c.

block_t stealBlock

Definition at line 11 of file bags.c.

block_t stealPrev

Definition at line 11 of file bags.c.

bool foundAdd

Definition at line 12 of file bags.c.

int threadHead

Definition at line 13 of file bags.c.

int stealHead

Definition at line 13 of file bags.c.

int stealIndex

Definition at line 13 of file bags.c.

int threadID

Definition at line 14 of file bags.c.