#include <pthread.h>#include <string.h>Go to the source code of this file.
Compounds | |
| struct | _pt_arg_t_ |
| struct | _pt_gate_t_ |
| struct | _pt_pipeline_t_ |
Defines | |
| #define | pt_create(t, start, arg, msg) |
| #define | pt_create_detached(start, arg, msg) |
| #define | pt_wait(t, exitcode, msg) |
| #define | pt_exit(status) |
| #define | pt_mutex_init(m, msg) |
| #define | pt_mutex_destroy(m, msg) |
| #define | pt_cond_init(c, msg) |
| #define | pt_cond_destroy(c, msg) |
| #define | pt_mutex_lock(m, msg) |
| #define | pt_mutex_unlock(m, msg) |
| #define | pt_cond_wait(c, m, msg) |
| #define | pt_cond_broadcast(c, msg) |
| #define | pt_cond_signal(c, msg) |
| #define | pt_myid(th_arg) ((th_arg)->myid) |
| #define | pt_nthreads(th_arg) ((th_arg)->nthreads) |
| #define | pt_data(th_arg) ((th_arg)->data) |
| #define | pt_self(th_arg) (&((th_arg)->self)) |
| #define | pt_thread(th_arg, id) (&(((th_arg)-((th_arg)->myid)+(id))->self)) |
| #define | pt_cancel(th_arg, id) |
| #define | pt_cancel_all(th_arg) |
| #define | pt_fork(nt, start, arg, codes) |
| #define | pt_pipeline_init(p, gdata, setup, stage) |
| #define | F77PIPELINEINIT pipeline_init_ |
| #define | F77PIPELINEDONE pipeline_done_ |
| #define | F77PIPELINEEXEC pipeline_execute_ |
Typedefs | |
| typedef void *(* | pt_startroutine_t )(void *) |
| typedef void * | pt_addr_t |
| typedef _pt_arg_t_ | pt_arg_t |
| typedef _pt_gate_t_ | pt_gate_t |
| typedef _pt_pipeline_t_ | pt_pipeline_t |
Functions | |
| int | pt_mutex_trylock (pthread_mutex_t *m, char *msg) |
| void | _pt_fork (int nthreads, pt_startroutine_t start, pt_addr_t arg, pt_addr_t *exitcodes) |
| void | pt_gate_init (pt_gate_t *gate, int nthreads) |
| void | pt_gate_destroy (pt_gate_t *gate) |
| void | pt_gate_sync (pt_gate_t *gate) |
| void | _pt_pipeline_init (pt_pipeline_t *p, pt_addr_t gdata, pt_startroutine_t setup, pt_startroutine_t stage) |
| void | pt_pipeline_destroy (pt_pipeline_t *p) |
| void | pt_pipeline_execute (pt_pipeline_t *p) |
|
|
|
|
|
|
|
|
|
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cancel(((th_arg)-((th_arg)->myid)+(id))->self)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int myid=(th_arg)->myid,nt=(th_arg)->nthreads,i,errcode; \
pt_arg_t *base=(th_arg)-myid; \
\
for (i=0; i<nt; i++) { \
if (i==id) continue; \
if (errcode=pthread_cancel(base[i].self)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cond_broadcast(c)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cond_destroy(c)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cond_init(c,NULL)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cond_signal(c)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_cond_wait(c,m)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_create(t, \
NULL, \
(pt_startroutine_t) (start), \
(pt_addr_t) (arg))) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
pthread_t t; \
int errcode; \
\
if (errcode=pthread_create(&t, \
NULL, \
(pt_startroutine_t) (start), \
(pt_addr_t) (arg))) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
if (pthread_detach(t)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
|
|
|
Value: { \
pthread_exit(status); \
} |
|
|
Value: _pt_fork(nt,(pt_startroutine_t) start, \ (pt_addr_t) arg,(pt_addr_t *) codes) |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_mutex_destroy(m)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
}Definition at line 99 of file pt.h. Referenced by matvec::GLMM::build_hInv(). |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_mutex_init(m,NULL)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
}Definition at line 89 of file pt.h. Referenced by matvec::GLMM::build_hInv(). |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_mutex_lock(m)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
Value: { \
int errcode; \
\
if (errcode=pthread_mutex_unlock(m)) { \
fprintf(stderr,"%s: %s\n",msg,strerror(errcode)); \
exit(1); \
} \
} |
|
|
|
|
|
|
|
|
Value: _pt_pipeline_init(p, \ (pt_addr_t) gdata, \ (pt_startroutine_t) setup, \ (pt_startroutine_t) stage) |
|
|
|
|
|
|
|
|
Value: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
1.2.16