diff options
| author | bje <bje> | 1998-07-12 11:20:27 +0000 | 
|---|---|---|
| committer | bje <bje> | 1998-07-12 11:20:27 +0000 | 
| commit | a0c8a187f3c4d5107ab1f3ad265128ad92725222 (patch) | |
| tree | 465b03c88f6627e3602e97237474de13c5bbc45c | |
| parent | a0fa92a6b0b850a158052b40b4888c504a65e3f6 (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.
| -rw-r--r-- | pthread.h | 17 | 
1 files changed, 16 insertions, 1 deletions
| @@ -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. */ | 
