summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-05-06 13:51:58 +0300
committerunknown <monty@mishka.local>2005-05-06 13:51:58 +0300
commitf43c58178159aeef3a5aea22390238aeb9b1e772 (patch)
tree4ae68ee5fcd5cdd54cefba299cab2ccb0e57f806 /mysys
parent0b2ae60c6220b01411a293c5a439605b2672a50b (diff)
parentab54e167052bb03f7f25cb071ee75f4f26caf68f (diff)
downloadmariadb-git-f43c58178159aeef3a5aea22390238aeb9b1e772.tar.gz
merge
sql/ha_innodb.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/key.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/unireg.cc: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_thr_init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 878e1f6bfc6..4d23d01cd82 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -67,12 +67,11 @@ my_bool my_thread_global_init(void)
/*
Set mutex type to "fast" a.k.a "adaptive"
- The mutex kind determines what happens if a thread attempts to lock
- a mutex it already owns with pthread_mutex_lock(3). If the mutex
- is of the ``fast'' kind, pthread_mutex_lock(3) simply suspends
- the calling thread forever. If the mutex is of the ``error checking''
- kind, pthread_mutex_lock(3) returns immediately with the error
- code EDEADLK.
+ In this case the thread may steal the mutex from some other thread
+ that is waiting for the same mutex. This will save us some
+ context switches but may cause a thread to 'starve forever' while
+ waiting for the mutex (not likely if the code within the mutex is
+ short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,