Mail Archives: cygwin/2002/12/06/18:45:30
--------------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 -