Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3DF13580.5060403@earthlink.net> Date: Fri, 06 Dec 2002 15:40:48 -0800 From: Christophe Galerne User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en, fr-fr, fr MIME-Version: 1.0 To: cygwin , cygwin-patches AT cygwin DOT com Subject: [patch] Symbolic value for PTHREAD_MUTEX_DEFAULT Content-Type: multipart/mixed; boundary="------------020708060309050108090106" --------------020708060309050108090106 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, As discussed with Robert Collins, I propose this patch to make the 'default' mutex type more explicit. 2002-12-05 Christophe Galerne * pthread.h (PTHREAD_MUTEX_DEFAULT): reorder PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_RECURSIVE so that PTHREAD_MUTEX_DEFAULT can be defined as PTHREAD_MUTEX_RECURSIVE. add a comment that PTHREAD_MUTEX_NORMAL is not yet implemented. --------------020708060309050108090106 Content-Type: text/plain; name="pthread_constant.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pthread_constant.patch" ? pthread_constant.patch Index: pthread.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/pthread.h,v retrieving revision 1.12 diff -u -p -r1.12 pthread.h --- pthread.h 4 Jul 2002 14:17:30 -0000 1.12 +++ pthread.h 6 Dec 2002 22:55:18 -0000 @@ -50,12 +50,15 @@ extern "C" #define PTHREAD_CREATE_JOINABLE 0 #define PTHREAD_EXPLICIT_SCHED 1 #define PTHREAD_INHERIT_SCHED 0 -#define PTHREAD_MUTEX_DEFAULT 0 + +#define PTHREAD_MUTEX_RECURSIVE 0 #define PTHREAD_MUTEX_ERRORCHECK 1 +/* not implemented yet */ #define PTHREAD_MUTEX_NORMAL 2 +#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_RECURSIVE + /* this should be too low to ever be a valid address */ #define PTHREAD_MUTEX_INITIALIZER (void *)20 -#define PTHREAD_MUTEX_RECURSIVE 0 #define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 } #define PTHREAD_PRIO_INHERIT #define PTHREAD_PRIO_NONE @@ -103,7 +106,7 @@ void pthread_cleanup_push (void (*routin void pthread_cleanup_pop (int execute); */ typedef void (*__cleanup_routine_type) (void *); -typedef struct _pthread_cleanup_handler +typedef struct _pthread_cleanup_handler { __cleanup_routine_type function; void *arg; --------------020708060309050108090106 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------020708060309050108090106--