#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 |
pthread_praq_t are functions that order output of results that finish executing out of order
anonymous enum |
int pthread_praq_acquire | ( | pthread_praq_t * | praq, | |
void ** | data | |||
) |
suspend calling thread until next data becomes available
praq | pointer to pthread_praq_t structure | |
data | pointer to data |
int pthread_praq_destroy | ( | pthread_praq_t * | praq | ) |
destroy pthread_praq_t structure
praq | pointer to pthread_praq_t structure |
int pthread_praq_init | ( | pthread_praq_t * | praq, | |
const pthread_praqattr_t * | attr, | |||
const int | length | |||
) |
initialize pthread_praq_t structure
praq | pointer to pthread_praq_t structure | |
attr | pointer to pthread_praq_t attribute structure | |
length | maximum length of ordered queue |
int pthread_praq_propose | ( | pthread_praq_t * | praq, | |
const int | order_num | |||
) |
suspend calling thread until order_num can be processed
praq | pointer to pthread_praq_t structure | |
order_num | order number |
int pthread_praq_release | ( | pthread_praq_t * | praq, | |
const int | order_num, | |||
void * | data | |||
) |
add data to queue for order order_num
praq | pointer to pthread_praq_t structure | |
order_num | order number | |
data | pointer to data |
int pthread_praq_reset | ( | pthread_praq_t * | praq | ) |
reset order back to zero
praq | pointer to pthread_praq_t structure |
int pthread_praqattr_destroy | ( | pthread_praqattr_t * | attr | ) |
destroy pthread_praq_t attribute structure
attr | pointer to pthread_praq_t attribute structure |
int pthread_praqattr_getblock | ( | const pthread_praqattr_t * | attr, | |
int * | block | |||
) |
assign block the current blocking attribute
attr | pointer to pthread_praq_t attribute structure | |
block | pointer to blocking attribute |
int pthread_praqattr_init | ( | pthread_praqattr_t * | attr | ) |
initialize pthread_praq_t attribute structure
attr | pointer to pthread_praq_t attribute structure |
int pthread_praqattr_setblock | ( | pthread_praqattr_t * | attr, | |
const int | block | |||
) |
assign the current blocking attribute
attr | pointer to pthread_praq_t attribute structure | |
block | blocking attribute |