#include "common.h"#include "errabort.h"#include "pthreadWrap.h"Include dependency graph for pthreadWrap.c:

Go to the source code of this file.
Functions | |
| static void | pwarn (char *function, int err) |
| static void | perr (char *function, int err) |
| void | pthreadCreate (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) |
| boolean | pthreadMayCreate (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) |
| void | pthreadMutexInit (pthread_mutex_t *mutex) |
| void | pthreadMutexDestroy (pthread_mutex_t *mutex) |
| void | pthreadMutexLock (pthread_mutex_t *mutex) |
| void | pthreadMutexUnlock (pthread_mutex_t *mutex) |
| void | pthreadCondInit (pthread_cond_t *cond) |
| void | pthreadCondDestroy (pthread_cond_t *cond) |
| void | pthreadCondSignal (pthread_cond_t *cond) |
| void | pthreadCondWait (pthread_cond_t *cond, pthread_mutex_t *mutex) |
Variables | |
| static char const | rcsid [] = "$Id: pthreadWrap.c,v 1.3 2003/05/06 07:33:44 kate Exp $" |
| static void perr | ( | char * | function, | |
| int | err | |||
| ) | [static] |
Definition at line 19 of file pthreadWrap.c.
References noWarnAbort(), and pwarn().
Referenced by pthreadCondDestroy(), pthreadCondInit(), pthreadCondSignal(), pthreadCondWait(), pthreadCreate(), pthreadMutexDestroy(), pthreadMutexInit(), pthreadMutexLock(), and pthreadMutexUnlock().
00022 { 00023 if (err != 0) 00024 { 00025 pwarn(function, err); 00026 noWarnAbort(); 00027 } 00028 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadCondDestroy | ( | pthread_cond_t * | cond | ) |
Definition at line 82 of file pthreadWrap.c.
References perr().
Referenced by synQueueFree(), and synQueueFreeAndVals().
00084 { 00085 int err = pthread_cond_destroy(cond); 00086 perr("pthread_cond_destroy", err); 00087 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadCondInit | ( | pthread_cond_t * | cond | ) |
Definition at line 75 of file pthreadWrap.c.
References perr().
Referenced by synQueueNew().
00077 { 00078 int err = pthread_cond_init(cond, NULL); 00079 perr("pthread_cond_init", err); 00080 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadCondSignal | ( | pthread_cond_t * | cond | ) |
Definition at line 89 of file pthreadWrap.c.
References perr().
Referenced by synQueuePut().
00092 { 00093 int err = pthread_cond_signal(cond); 00094 perr("pthread_cond_signal", err); 00095 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadCondWait | ( | pthread_cond_t * | cond, | |
| pthread_mutex_t * | mutex | |||
| ) |
Definition at line 97 of file pthreadWrap.c.
References perr().
Referenced by synQueueGet().
00099 { 00100 int err = pthread_cond_wait(cond, mutex); 00101 perr("pthread_cond_wait", err); 00102 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadCreate | ( | pthread_t * | thread, | |
| const pthread_attr_t * | attr, | |||
| void *(*)(void *) | start_routine, | |||
| void * | arg | |||
| ) |
Definition at line 30 of file pthreadWrap.c.
References perr().
00033 { 00034 int err = pthread_create(thread, attr, start_routine, arg); 00035 perr("pthread_create", err); 00036 }
Here is the call graph for this function:

| boolean pthreadMayCreate | ( | pthread_t * | thread, | |
| const pthread_attr_t * | attr, | |||
| void *(*)(void *) | start_routine, | |||
| void * | arg | |||
| ) |
Definition at line 38 of file pthreadWrap.c.
References pwarn().
00041 { 00042 int err = pthread_create(thread, attr, start_routine, arg); 00043 pwarn("pthread_create", err); 00044 return err == 0; 00045 }
Here is the call graph for this function:

| void pthreadMutexDestroy | ( | pthread_mutex_t * | mutex | ) |
Definition at line 54 of file pthreadWrap.c.
References perr().
Referenced by synQueueFree(), and synQueueFreeAndVals().
00056 { 00057 int err = pthread_mutex_destroy(mutex); 00058 perr("pthread_mutex_destroy", err); 00059 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadMutexInit | ( | pthread_mutex_t * | mutex | ) |
Definition at line 47 of file pthreadWrap.c.
References perr().
Referenced by synQueueNew().
00049 { 00050 int err = pthread_mutex_init(mutex, NULL); 00051 perr("pthread_mutex_init", err); 00052 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadMutexLock | ( | pthread_mutex_t * | mutex | ) |
Definition at line 61 of file pthreadWrap.c.
References perr().
Referenced by synQueueGet(), synQueueGrab(), synQueuePut(), and synQueueSize().
00063 { 00064 int err = pthread_mutex_lock(mutex); 00065 perr("pthread_mutex_lock", err); 00066 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pthreadMutexUnlock | ( | pthread_mutex_t * | mutex | ) |
Definition at line 68 of file pthreadWrap.c.
References perr().
Referenced by synQueueGet(), synQueueGrab(), synQueuePut(), and synQueueSize().
00070 { 00071 int err = pthread_mutex_unlock(mutex); 00072 perr("pthread_mutex_unlock", err); 00073 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void pwarn | ( | char * | function, | |
| int | err | |||
| ) | [static] |
Definition at line 12 of file pthreadWrap.c.
References warn().
Referenced by perr(), and pthreadMayCreate().
00014 { 00015 if (err != 0) 00016 warn("Couldn't %s: %s\n", function, strerror(err)); 00017 }
Here is the call graph for this function:

Here is the caller graph for this function:

char const rcsid[] = "$Id: pthreadWrap.c,v 1.3 2003/05/06 07:33:44 kate Exp $" [static] |
Definition at line 10 of file pthreadWrap.c.
1.5.2