List:Commits« Previous MessageNext Message »
From:Brian Aker Date:March 18 2007 5:06pm
Subject:bk commit into 5.1 tree (brian:1.2499)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of brian. When brian 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@stripped, 2007-03-18 10:06:28-07:00, brian@stripped +1 -0
  Restoring attr (aka poking around Windows did not work). 

  client/mysqlslap.c@stripped, 2007-03-18 10:04:58-07:00, brian@stripped +6 -1
    Restorinng attr

# 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:	brian
# Host:	piggy.tangent.org
# Root:	/home/brian/mysql-5.1-arch

--- 1.50/client/mysqlslap.c	2007-03-18 10:06:33 -07:00
+++ 1.51/client/mysqlslap.c	2007-03-18 10:06:33 -07:00
@@ -1560,6 +1560,10 @@
   con.limit= limit;
 
   pthread_t mainthread;            /* Thread descriptor */
+  pthread_attr_t attr;          /* Thread attributes */
+  pthread_attr_init(&attr);
+  pthread_attr_setdetachstate(&attr,
+		  PTHREAD_CREATE_DETACHED);
 
   pthread_mutex_lock(&counter_mutex);
   thread_counter= 0;
@@ -1570,7 +1574,7 @@
   for (x= 0; x < concur; x++)
   {
     /* nowucreate the thread */
-    if (pthread_create(&mainthread, NULL, run_task, 
+    if (pthread_create(&mainthread, &attr, run_task, 
                        (void *)&con) != 0)
     {
       fprintf(stderr,"%s: Could not create thread\n",
@@ -1580,6 +1584,7 @@
     thread_counter++;
   }
   pthread_mutex_unlock(&counter_mutex);
+  pthread_attr_destroy(&attr);
 
   pthread_mutex_lock(&sleeper_mutex);
   master_wakeup= 0;
Thread
bk commit into 5.1 tree (brian:1.2499)Brian Aker18 Mar