Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

cpmthread.h

Go to the documentation of this file.
00001 #ifndef _C_PM_THREAD_H_
00002 #define _C_PM_THREAD_H_
00003 
00004 #define PMTHREAD_ERROR -1
00005 
00006 #include <pthread.h>
00007 
00008 typedef pthread_t pmthread;
00009 typedef pthread_mutex_t pmmutex;
00010 typedef pthread_cond_t pmcond;
00011 
00012 // Threads
00013 pmthread pmthread_new(void *(*thread)(void *args), void *args);
00014 int pmthread_destroy(pmthread threadID);
00015 int pmthread_wait(pmthread threadID);
00016 
00017 // Mutexs
00018 pmmutex pmmutex_new();
00019 int pmmutex_destroy(pmmutex *mutex);
00020 int pmmutex_lock(pmmutex *mutex);
00021 int pmmutex_unlock(pmmutex *mutex);
00022 
00023 // Conditional variables
00024 pmcond pmcond_new();
00025 int pmcond_destroy(pmcond *cond);
00026 int pmcond_wait(pmcond *cond, pmmutex *mutex);
00027 int pmcond_signal(pmcond *cond);
00028 int pmcond_broadcast(pmcond *cond);
00029 
00030 #endif
00031 

Generated on Mon Dec 1 17:00:22 2003 for Protomake by doxygen1.3