summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorpappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se <>2005-07-21 01:29:57 -0400
committerpappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se <>2005-07-21 01:29:57 -0400
commit6026054ead01bb2f733529b1a3aa4382a2ced2c0 (patch)
treef28d036bdc60c31c38b1d066b2d9e02fa4e980e6 /mysys
parent69a3209275369e799588a52b3fa748413932e3dc (diff)
parentac6623f08fe059e4ee49c4f3eaa73198b8ca9d82 (diff)
downloadmariadb-git-6026054ead01bb2f733529b1a3aa4382a2ced2c0.tar.gz
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
Diffstat (limited to 'mysys')
-rw-r--r--mysys/thr_lock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index b12f8234c26..f3179fee994 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -1048,9 +1048,10 @@ void thr_abort_locks(THR_LOCK *lock)
This is used to abort all locks for a specific thread
*/
-void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
+bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
THR_LOCK_DATA *data;
+ bool found= FALSE;
DBUG_ENTER("thr_abort_locks_for_thread");
pthread_mutex_lock(&lock->mutex);
@@ -1061,6 +1062,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
DBUG_PRINT("info",("Aborting read-wait lock"));
data->type= TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
+ found= TRUE;
pthread_cond_signal(data->cond);
data->cond= 0; /* Removed from list */
@@ -1076,6 +1078,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
DBUG_PRINT("info",("Aborting write-wait lock"));
data->type= TL_UNLOCK;
+ found= TRUE;
pthread_cond_signal(data->cond);
data->cond= 0;
@@ -1086,7 +1089,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
}
}
pthread_mutex_unlock(&lock->mutex);
- DBUG_VOID_RETURN;
+ DBUG_RETURN(found);
}