From a0c8a187f3c4d5107ab1f3ad265128ad92725222 Mon Sep 17 00:00:00 2001 From: bje Date: Sun, 12 Jul 1998 11:20:27 +0000 Subject: 1998-07-12 Ben Elliston * 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. --- pthread.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'pthread.h') 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. */ -- cgit v1.2.3