List:Internals« Previous MessageNext Message »
From:msvensson Date:April 27 2005 1:26pm
Subject:bk commit into 4.1 tree (msvensson:1.2210) BUG#9954
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2210 05/04/27 13:25:56 msvensson@neptunus.(none) +2 -0
  Bug #9954  	mysql-4.1.11/cmd-line-utils/libedit/makelist.sh is not portable
   - Reverted removal of errorcheck mutex initialise, used in safe_mutex_init. 

  mysys/my_thr_init.c
    1.30 05/04/27 13:25:54 msvensson@neptunus.(none) +11 -0
    Reverted the removal of errorcheck mutex initializer

  include/my_pthread.h
    1.79 05/04/27 13:25:54 msvensson@neptunus.(none) +6 -0
    Reverted the removal of errorcheck mutex initializer

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1

--- 1.78/include/my_pthread.h	2005-04-27 09:59:09 +02:00
+++ 1.79/include/my_pthread.h	2005-04-27 13:25:54 +02:00
@@ -612,6 +612,12 @@
 #else
 #define MY_MUTEX_INIT_FAST   NULL
 #endif
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+extern pthread_mutexattr_t my_errorcheck_mutexattr;
+#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
+#else
+#define MY_MUTEX_INIT_ERRCHK   NULL
+#endif
 
 extern my_bool my_thread_global_init(void);
 extern void my_thread_global_end(void);

--- 1.29/mysys/my_thr_init.c	2005-04-27 09:59:09 +02:00
+++ 1.30/mysys/my_thr_init.c	2005-04-27 13:25:54 +02:00
@@ -40,6 +40,9 @@
 #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
 pthread_mutexattr_t my_fast_mutexattr;
 #endif
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+pthread_mutexattr_t my_errorcheck_mutexattr;
+#endif
 
 /*
   initialize thread environment
@@ -74,6 +77,14 @@
   pthread_mutexattr_init(&my_fast_mutexattr);
   pthread_mutexattr_settype(&my_fast_mutexattr,
                             PTHREAD_MUTEX_ADAPTIVE_NP);
+#endif
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+  /*
+    Set mutex type to "errorcheck" a.k.a "adaptive"
+  */
+  pthread_mutexattr_init(&my_errorcheck_mutexattr);
+  pthread_mutexattr_settype(&my_errorcheck_mutexattr,
+                            PTHREAD_MUTEX_ERRORCHECK);
 #endif
 
   pthread_mutex_init(&THR_LOCK_malloc,MY_MUTEX_INIT_FAST);
Thread
bk commit into 4.1 tree (msvensson:1.2210) BUG#9954msvensson27 Apr