summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
authorbje <bje>1998-07-12 11:20:27 +0000
committerbje <bje>1998-07-12 11:20:27 +0000
commita0c8a187f3c4d5107ab1f3ad265128ad92725222 (patch)
tree465b03c88f6627e3602e97237474de13c5bbc45c /pthread.h
parenta0fa92a6b0b850a158052b40b4888c504a65e3f6 (diff)
1998-07-12 Ben Elliston <bje@cygnus.com>
* pthread.h (pthread_mutexattr_init): Add function prototype. (pthread_mutexattr_destroy): Likewise. (pthread_mutexattr_setpshared): Likewise. (pthread_mutexattr_getpshared): Likewise. (PTHREAD_PROCESS_PRIVATE): Define. (PTHREAD_PROCESS_SHARED): Define.
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/pthread.h b/pthread.h
index e5041e5..e3abbfb 100644
--- a/pthread.h
+++ b/pthread.h
@@ -22,8 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PTHREADS_H
#define _PTHREADS_H
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
typedef HANDLE pthread_t;
-typedef void pthread_mutexattr_t;
+typedef struct { void * ptr; } pthread_mutexattr_t;
#ifdef __cplusplus
extern "C" {
@@ -42,6 +45,18 @@ int pthread_equal(pthread_t t1, pthread_t t2);
int pthread_join(pthread_t thread, void ** valueptr);
+/* Functions for manipulating mutex attribute objects. */
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
+ int pshared);
+
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr,
+ int *pshared);
+
/* These functions cannot be implemented in terms of the Win32 API.
Fortunately they are optional. Their implementation just returns
the correct error number. */