summaryrefslogtreecommitdiff
path: root/lib/libc_r/include/pthread.h
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1998-11-09 03:13:22 +0000
committerDavid Leonard <d@cvs.openbsd.org>1998-11-09 03:13:22 +0000
commitff47464de5e68e9c49fe312c953f54b2e90f546c (patch)
tree4ec0e7f13d619e1b5bf6abfd7125a4ec17569568 /lib/libc_r/include/pthread.h
parent1b2b2c2386c6cc5ebffc769b8a39b80d47e4e0d0 (diff)
sync with FreeBSD (rwlock, gc thread, man pages)
add (broken) mips md stuff fix some const warnings add sigaltstack() stub another hash at getting shlib auto-init to work (mips/elf and i386/a.out)
Diffstat (limited to 'lib/libc_r/include/pthread.h')
-rw-r--r--lib/libc_r/include/pthread.h45
1 files changed, 26 insertions, 19 deletions
diff --git a/lib/libc_r/include/pthread.h b/lib/libc_r/include/pthread.h
index aabf39fb335..4c8d0f2a173 100644
--- a/lib/libc_r/include/pthread.h
+++ b/lib/libc_r/include/pthread.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: pthread.h,v 1.1 1998/09/05 07:40:47 d Exp $
+ * $OpenBSD: pthread.h,v 1.2 1998/11/09 03:13:14 d Exp $
*
*/
#ifndef _PTHREAD_H_
@@ -85,6 +85,12 @@
#define PTHREAD_EXPLICIT_SCHED 0
/*
+ * Flags for read/write lock attributes
+ */
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+/*
* Forward structure definitions.
*
* These are mostly opaque to the user.
@@ -96,6 +102,8 @@ struct pthread_cond_attr;
struct pthread_mutex;
struct pthread_mutex_attr;
struct pthread_once;
+struct pthread_rwlock;
+struct pthread_rwlockattr;
struct sched_param;
/*
@@ -113,6 +121,8 @@ typedef struct pthread_cond *pthread_cond_t;
typedef struct pthread_cond_attr *pthread_condattr_t;
typedef int pthread_key_t;
typedef struct pthread_once pthread_once_t;
+typedef struct pthread_rwlock *pthread_rwlock_t;
+typedef struct pthread_rwlockattr *pthread_rwlockattr_t;
/*
* Additional type definitions:
@@ -147,6 +157,7 @@ struct pthread_once {
*/
#define PTHREAD_MUTEX_INITIALIZER NULL
#define PTHREAD_COND_INITIALIZER NULL
+#define PTHREAD_RWLOCK_INITIALIZER NULL
/*
* Default attribute arguments (draft 4, deprecated).
@@ -237,6 +248,20 @@ int pthread_mutex_trylock __P((pthread_mutex_t *));
int pthread_mutex_unlock __P((pthread_mutex_t *));
int pthread_once __P((pthread_once_t *,
void (*init_routine) (void)));
+int pthread_rwlock_destroy __P((pthread_rwlock_t *));
+int pthread_rwlock_init __P((pthread_rwlock_t *,
+ const pthread_rwlockattr_t *));
+int pthread_rwlock_rdlock __P((pthread_rwlock_t *));
+int pthread_rwlock_tryrdlock __P((pthread_rwlock_t *));
+int pthread_rwlock_trywrlock __P((pthread_rwlock_t *));
+int pthread_rwlock_unlock __P((pthread_rwlock_t *));
+int pthread_rwlock_wrlock __P((pthread_rwlock_t *));
+int pthread_rwlockattr_init __P((pthread_rwlockattr_t *));
+int pthread_rwlockattr_getpshared __P((const pthread_rwlockattr_t *,
+ int *));
+int pthread_rwlockattr_setpshared __P((pthread_rwlockattr_t *,
+ int *));
+int pthread_rwlockattr_destroy __P((pthread_rwlockattr_t *));
pthread_t pthread_self __P((void));
int pthread_setcancelstate __P((int, int *));
int pthread_setcanceltype __P((int, int *));
@@ -277,10 +302,6 @@ int pthread_attr_setcleanup __P((pthread_attr_t *,
#define PTHREAD_PRIO_PROTECT
#define PTHREAD_PROCESS_SHARED
#define PTHREAD_PROCESS_PRIVATE
-#define PTHREAD_RWLOCK_INITIALIZER
-
-typedef void *pthread_rwlock_t;
-typedef void *pthread_rwlockattr_t;
int pthread_attr_getguardsize __P((const pthread_attr_t *,
size_t *));
@@ -291,20 +312,6 @@ int pthread_mutexattr_gettype __P((const pthread_mutexattr_t *,
int *));
int pthread_mutexattr_settype __P((const pthread_mutexattr_t *,
int));
-int pthread_rwlock_destroy __P((pthread_rwlock_t *));
-int pthread_rwlock_init __P((pthread_rwlock_t *,
- const pthread_rwlockattr_t *));
-int pthread_rwlock_rdlock __P((pthread_rwlock_t *));
-int pthread_rwlock_tryrdlock __P((pthread_rwlock_t *));
-int pthread_rwlock_trywrlock __P((pthread_rwlock_t *));
-int pthread_rwlock_unlock __P((pthread_rwlock_t *));
-int pthread_rwlock_wrlock __P((pthread_rwlock_t *));
-int pthread_rwlockattr_destroy __P((pthread_rwlockattr_t *));
-int pthread_rwlockattr_getpshared __P((const pthread_rwlockattr_t *,
- int *));
-int pthread_rwlockattr_init __P((pthread_rwlockattr_t *));
-int pthread_rwlockattr_setpshared __P((pthread_rwlockattr_t *,
- int));
int pthread_setconcurrency __P((int));
#endif /* susv2 */