pthread_praq.h File Reference

Propose Release Aquire Queue - praq (name by James Plourde). More...

#include <pthread.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  pthread_praqattr_t
 pthread_praq_t attribute structure More...
struct  praq_data_t
 pthread_praq_t data structure More...
struct  pthread_praq_t
 pthread_praq_t structure More...

Defines

#define PTHREAD_PRAQ_NONBLOCKING   PTHREAD_PRAQ_NONBLOCKING
 non-blocking enumeration
#define PTHREAD_PRAQ_BLOCKING   PTHREAD_PRAQ_BLOCKING
 blocking enumeration.

Enumerations

enum  { PTHREAD_PRAQ_NONBLOCKING, PTHREAD_PRAQ_BLOCKING }
 enumeration for praq objects More...

Functions

int pthread_praq_init (pthread_praq_t *praq, const pthread_praqattr_t *attr, const int length)
 initialize pthread_praq_t structure
int pthread_praq_destroy (pthread_praq_t *praq)
 destroy pthread_praq_t structure
int pthread_praq_acquire (pthread_praq_t *praq, void **data)
 suspend calling thread until next data becomes available
int pthread_praq_propose (pthread_praq_t *praq, const int order_num)
 suspend calling thread until order_num can be processed
int pthread_praq_release (pthread_praq_t *praq, const int order_num, void *data)
 add data to queue for order order_num
int pthread_praq_reset (pthread_praq_t *praq)
 reset order back to zero
int pthread_praqattr_init (pthread_praqattr_t *attr)
 initialize pthread_praq_t attribute structure
int pthread_praqattr_destroy (pthread_praqattr_t *attr)
 destroy pthread_praq_t attribute structure
int pthread_praqattr_getblock (const pthread_praqattr_t *attr, int *block)
 assign block the current blocking attribute
int pthread_praqattr_setblock (pthread_praqattr_t *attr, const int block)
 assign the current blocking attribute


Detailed Description

Propose Release Aquire Queue - praq (name by James Plourde).

pthread_praq_t are functions that order output of results that finish executing out of order


Enumeration Type Documentation

anonymous enum

enumeration for praq objects

Enumerator:
PTHREAD_PRAQ_NONBLOCKING  non-blocking enumeration
PTHREAD_PRAQ_BLOCKING  blocking enumeration.


Function Documentation

int pthread_praq_acquire ( pthread_praq_t praq,
void **  data 
)

suspend calling thread until next data becomes available

Parameters:
praq pointer to pthread_praq_t structure
data pointer to data
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praq_destroy ( pthread_praq_t praq  ) 

destroy pthread_praq_t structure

Parameters:
praq pointer to pthread_praq_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praq_init ( pthread_praq_t praq,
const pthread_praqattr_t attr,
const int  length 
)

initialize pthread_praq_t structure

Parameters:
praq pointer to pthread_praq_t structure
attr pointer to pthread_praq_t attribute structure
length maximum length of ordered queue
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praq_propose ( pthread_praq_t praq,
const int  order_num 
)

suspend calling thread until order_num can be processed

Parameters:
praq pointer to pthread_praq_t structure
order_num order number
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praq_release ( pthread_praq_t praq,
const int  order_num,
void *  data 
)

add data to queue for order order_num

Parameters:
praq pointer to pthread_praq_t structure
order_num order number
data pointer to data
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praq_reset ( pthread_praq_t praq  ) 

reset order back to zero

Parameters:
praq pointer to pthread_praq_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praqattr_destroy ( pthread_praqattr_t attr  ) 

destroy pthread_praq_t attribute structure

Parameters:
attr pointer to pthread_praq_t attribute structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praqattr_getblock ( const pthread_praqattr_t attr,
int *  block 
)

assign block the current blocking attribute

Parameters:
attr pointer to pthread_praq_t attribute structure
block pointer to blocking attribute
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praqattr_init ( pthread_praqattr_t attr  ) 

initialize pthread_praq_t attribute structure

Parameters:
attr pointer to pthread_praq_t attribute structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_praqattr_setblock ( pthread_praqattr_t attr,
const int  block 
)

assign the current blocking attribute

Parameters:
attr pointer to pthread_praq_t attribute structure
block blocking attribute
Returns:
0 is returned on success
non-zero error code is returned on failure


Generated on Tue Apr 24 20:01:36 2007 for libctf by  doxygen 1.5.1