summaryrefslogtreecommitdiff
path: root/mysys/thr_lock.c
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-22 12:36:17 -0700
committerunknown <jimw@mysql.com>2005-07-22 12:36:17 -0700
commit7bb359cd61a2f99aa40b4df78f5cf2192bf6d1bc (patch)
treebf4cbfdb2addba91aca2e568fe8fa8ec8d92ba15 /mysys/thr_lock.c
parent6fd718dfbbe6f9644e0ade69424517cfcff19d8c (diff)
parent46b0edc444c0dffafbbce8ef5b65f61a0224bef1 (diff)
downloadmariadb-git-7bb359cd61a2f99aa40b4df78f5cf2192bf6d1bc.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-build
into mysql.com:/home/jimw/my/mysql-5.0-clean mysys/thr_lock.c: Auto merged sql/ha_federated.cc: Auto merged
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r--mysys/thr_lock.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index f3179fee994..41c3ed6fb5f 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -388,7 +388,6 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
{
struct st_my_thread_var *thread_var= my_thread_var;
pthread_cond_t *cond= &thread_var->suspend;
- struct timeval now;
struct timespec wait_timeout;
enum enum_thr_lock_result result= THR_LOCK_ABORTED;
my_bool can_deadlock= test(data->owner->info->n_cursors);
@@ -406,11 +405,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
data->cond= cond;
if (can_deadlock)
- {
- gettimeofday(&now, 0);
- wait_timeout.tv_sec= now.tv_sec + table_lock_wait_timeout;
- wait_timeout.tv_nsec= now.tv_usec * 1000;
- }
+ set_timespec(wait_timeout, table_lock_wait_timeout);
while (!thread_var->abort || in_wait_list)
{
int rc= can_deadlock ? pthread_cond_timedwait(cond, &data->lock->mutex,