delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/06/18:45:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <christophegalerne AT earthlink DOT net>
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 AT cygwin DOT com>, cygwin-patches AT cygwin DOT com
Subject: [patch] Symbolic value for PTHREAD_MUTEX_DEFAULT

--------------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 <christophegalerne AT earthlink DOT net>

	* 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019