diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-10-31 20:48:32 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-10-31 20:48:32 +0000 |
commit | 4566131a4e587274adfde74f60c2c6430c549928 (patch) | |
tree | 7a7619a8b20c415b7613bebaec8c81a154159f51 /lib/libpthread | |
parent | edf5e77e974b2242dd25bc86d2ad5a7b5b551ed9 (diff) |
- Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution.
- Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST.
From stefanf FreeBSD
ok fgsch@
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/include/pthread.h | 8 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_mattr_kind_np.c | 6 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_mutex.c | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/lib/libpthread/include/pthread.h b/lib/libpthread/include/pthread.h index 5dfa3824924..6320c6dea86 100644 --- a/lib/libpthread/include/pthread.h +++ b/lib/libpthread/include/pthread.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread.h,v 1.24 2005/10/30 04:00:38 brad Exp $ */ +/* $OpenBSD: pthread.h,v 1.25 2005/10/31 20:48:30 brad Exp $ */ /* * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu @@ -182,8 +182,6 @@ struct pthread_once { * * PTHREAD_MUTEX_NORMAL * PTHREAD_MUTEX_RECURSIVE - * MUTEX_TYPE_FAST (deprecated) - * MUTEX_TYPE_COUNTING_FAST (deprecated) * * will deviate from POSIX specified semantics. */ @@ -191,12 +189,10 @@ enum pthread_mutextype { PTHREAD_MUTEX_ERRORCHECK = 1, /* Default POSIX mutex */ PTHREAD_MUTEX_RECURSIVE = 2, /* Recursive mutex */ PTHREAD_MUTEX_NORMAL = 3, /* No error checking */ - MUTEX_TYPE_MAX + PTHREAD_MUTEX_TYPE_MAX }; #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK -#define MUTEX_TYPE_FAST PTHREAD_MUTEX_NORMAL -#define MUTEX_TYPE_COUNTING_FAST PTHREAD_MUTEX_RECURSIVE /* * Thread function prototype definitions: diff --git a/lib/libpthread/uthread/uthread_mattr_kind_np.c b/lib/libpthread/uthread/uthread_mattr_kind_np.c index ddc9bee01fe..d18bad1ec4a 100644 --- a/lib/libpthread/uthread/uthread_mattr_kind_np.c +++ b/lib/libpthread/uthread/uthread_mattr_kind_np.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_mattr_kind_np.c,v 1.7 2001/08/10 14:37:20 fgsch Exp $ */ +/* $OpenBSD: uthread_mattr_kind_np.c,v 1.8 2005/10/31 20:48:31 brad Exp $ */ /* * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>. * All rights reserved. @@ -66,7 +66,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) { int ret; - if (attr == NULL || *attr == NULL || type >= MUTEX_TYPE_MAX) { + if (attr == NULL || *attr == NULL || type >= PTHREAD_MUTEX_TYPE_MAX) { ret = EINVAL; } else { (*attr)->m_type = type; @@ -81,7 +81,7 @@ pthread_mutexattr_gettype(pthread_mutexattr_t *attr, int *type) int ret; if (attr == NULL || *attr == NULL || (*attr)->m_type >= - MUTEX_TYPE_MAX) { + PTHREAD_MUTEX_TYPE_MAX) { ret = EINVAL; } else { *type = (*attr)->m_type; diff --git a/lib/libpthread/uthread/uthread_mutex.c b/lib/libpthread/uthread/uthread_mutex.c index 14733506ce1..748c6ffd2eb 100644 --- a/lib/libpthread/uthread/uthread_mutex.c +++ b/lib/libpthread/uthread/uthread_mutex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_mutex.c,v 1.17 2003/01/31 04:46:17 marc Exp $ */ +/* $OpenBSD: uthread_mutex.c,v 1.18 2005/10/31 20:48:31 brad Exp $ */ /* * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -131,7 +131,7 @@ pthread_mutex_init(pthread_mutex_t * mutex, /* Check mutex type: */ else if (((*mutex_attr)->m_type < PTHREAD_MUTEX_ERRORCHECK) || - ((*mutex_attr)->m_type >= MUTEX_TYPE_MAX)) + ((*mutex_attr)->m_type >= PTHREAD_MUTEX_TYPE_MAX)) /* Return an invalid argument error: */ ret = EINVAL; |