pthread_subpool.h File Reference

functions that provide a sub pool of pthread_pool_t More...

#include <pthread_pool.h>

Go to the source code of this file.

Data Structures

struct  pthread_subpoolattr_t
 pthread_subpool_t attribute structure More...
struct  pthread_subpool_t
 subpool structure More...

Functions

int pthread_subpool_init (pthread_subpool_t *subpool, const pthread_subpoolattr_t *attr, pthread_pool_t *pool)
 initialize subpool structure
int pthread_subpool_destroy (pthread_subpool_t *subpool)
 destroy subpool structure
int pthread_subpool_addwork (pthread_subpool_t *subpool, void(*routine)(void *), void *arg)
 add routine(arg) to subpool work to be done
int pthread_subpool_finishjob (pthread_subpool_t *subpool)
 signal the subpool that a job has finished
int pthread_subpool_finishwork (pthread_subpool_t *subpool)
 suspend calling thread until all subpool work is done
int pthread_subpoolattr_init (pthread_subpoolattr_t *attr)
 initialize subpool attribute structure
int pthread_subpoolattr_destroy (pthread_subpoolattr_t *attr)
 destroy subpool attribute structure


Detailed Description

functions that provide a sub pool of pthread_pool_t


Function Documentation

int pthread_subpool_addwork ( pthread_subpool_t subpool,
void(*)(void *)  routine,
void *  arg 
)

add routine(arg) to subpool work to be done

Parameters:
subpool pointer to subpool structure
routine pointer to a function
arg pointer to argument for routine
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_subpool_destroy ( pthread_subpool_t subpool  ) 

destroy subpool structure

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

int pthread_subpool_finishjob ( pthread_subpool_t subpool  ) 

signal the subpool that a job has finished

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

int pthread_subpool_finishwork ( pthread_subpool_t subpool  ) 

suspend calling thread until all subpool work is done

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

int pthread_subpool_init ( pthread_subpool_t subpool,
const pthread_subpoolattr_t attr,
pthread_pool_t pool 
)

initialize subpool structure

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

int pthread_subpoolattr_destroy ( pthread_subpoolattr_t attr  ) 

destroy subpool attribute structure

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

int pthread_subpoolattr_init ( pthread_subpoolattr_t attr  ) 

initialize subpool attribute structure

Parameters:
attr pointer to subpool attribute structure
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