diff options
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r-- | mysys/thr_alarm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index 2289f8208bc..5d2ac8b0099 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -120,6 +120,16 @@ void init_thr_alarm(uint max_alarms) DBUG_VOID_RETURN; } +void resize_thr_alarm(uint max_alarms) +{ + pthread_mutex_lock(&LOCK_alarm); + /* it's ok not to shrink the queue sometimes */ + if (alarm_queue.elements < max_alarms) + resize_queue(&alarm_queue,max_alarms+1); + pthread_mutex_unlock(&LOCK_alarm); + return; +} + /* Request alarm after sec seconds. |