00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(__PTHREAD_W32_H__)
00022 #define __PTHREAD_W32_H__
00023
00024 #define pthread_mutex_t int
00025
00026 #define pthread_once_t int
00027
00028 #define PTHREAD_ONCE_INIT 0
00029
00030 #define pthread_key_t int
00031
00032 #define pthread_t int
00033
00034 #define pthread_cond_t int
00035
00036 #define pthread_attr_t int
00037
00038 #define pthread_condattr_t int
00039
00040 #define pthread_mutexattr_t int
00041
00042 #define PTHREAD_MUTEX_INITIALIZER 0
00043
00044 #define PTHREAD_COND_INITIALIZER 0
00045
00046 #define ETIMEDOUT 1
00047
00048
00049
00050
00051
00052
00053
00054 int pthread_cond_init(pthread_cond_t * cond,
00055 const pthread_condattr_t * attr);
00056
00057 int pthread_cond_destroy(pthread_cond_t * cond);
00058
00059 int pthread_cond_broadcast(pthread_cond_t *cond);
00060
00061 int pthread_cond_signal(pthread_cond_t *cond);
00062
00063 int pthread_cond_timedwait(pthread_cond_t * cond,
00064 pthread_mutex_t * mutex,
00065 const struct timespec * abstime);
00066
00067 int pthread_cond_wait(pthread_cond_t * cond,
00068 pthread_mutex_t * mutex);
00069
00070
00071
00072
00073
00074
00075
00076 int pthread_mutex_init(pthread_mutex_t * mutex,
00077 const pthread_mutexattr_t * attr);
00078
00079 int pthread_mutex_destroy(pthread_mutex_t * mutex);
00080
00081 int pthread_mutex_lock(pthread_mutex_t * mutex);
00082
00083 int pthread_mutex_trylock(pthread_mutex_t * mutex);
00084
00085 int pthread_mutex_unlock(pthread_mutex_t * mutex);
00086
00087 int pthread_once(pthread_once_t * once_control,
00088 void (*init_routine)(void));
00089
00090
00091
00092
00093
00094
00095
00096
00097 int pthread_key_create(pthread_key_t * key,
00098 void (*destructor)(void*));
00099
00100 void * pthread_getspecific(pthread_key_t key);
00101
00102 int pthread_setspecific(pthread_key_t key,
00103 const void *value);
00104
00105
00106
00107
00108
00109
00110
00111
00112 int pthread_create(pthread_t * thread,
00113 const pthread_attr_t * attr,
00114 void * (*start_routine)(void *),
00115 void * arg);
00116
00117 int pthread_join(pthread_t thread,
00118 void ** value_ptr);
00119
00120
00121 #endif
00122