summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/pthread.h b/pthread.h
index e3abbfb..37cb9f8 100644
--- a/pthread.h
+++ b/pthread.h
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PTHREAD_PROCESS_SHARED 1
typedef HANDLE pthread_t;
+typedef HANDLE pthread_mutex_t;
typedef struct { void * ptr; } pthread_mutexattr_t;
#ifdef __cplusplus
@@ -57,6 +58,19 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr,
int *pshared);
+/* Primitives for mutexes. */
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ pthread_mutex_attr_t *attr);
+
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+
/* These functions cannot be implemented in terms of the Win32 API.
Fortunately they are optional. Their implementation just returns
the correct error number. */