summaryrefslogtreecommitdiff
path: root/mysys/thr_alarm.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-02-28 13:16:17 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-02-28 13:16:17 +0100
commitec89275da79a07e8906a6635c97c8925f9610bef (patch)
treecaa489ac345c382cb2c2d1d7c4ca5ec4989090f1 /mysys/thr_alarm.c
parentf0c682858f26efcebabb558068aa567eed44632e (diff)
parentb64a2fef59bf7269a51884e74197d78c5ff203ff (diff)
downloadmariadb-git-ec89275da79a07e8906a6635c97c8925f9610bef.tar.gz
merge threadpool
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r--mysys/thr_alarm.c88
1 files changed, 1 insertions, 87 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index 0dfde4ca257..7f3bce38c6a 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -598,93 +598,6 @@ static void *alarm_handler(void *arg __attribute__((unused)))
return 0; /* Impossible */
}
#endif /* USE_ALARM_THREAD */
-
-/*****************************************************************************
- thr_alarm for win95
-*****************************************************************************/
-
-#else /* __WIN__ */
-
-void thr_alarm_kill(my_thread_id thread_id)
-{
- /* Can't do this yet */
-}
-
-sig_handler process_alarm(int sig __attribute__((unused)))
-{
- /* Can't do this yet */
-}
-
-
-my_bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm)
-{
- (*alrm)= &alarm->alarmed;
- if (alarm_aborted)
- {
- alarm->alarmed.crono=0;
- return 1;
- }
- if (!(alarm->alarmed.crono=SetTimer((HWND) NULL,0, sec*1000,
- (TIMERPROC) NULL)))
- return 1;
- return 0;
-}
-
-
-my_bool thr_got_alarm(thr_alarm_t *alrm_ptr)
-{
- thr_alarm_t alrm= *alrm_ptr;
- MSG msg;
- if (alrm->crono)
- {
- PeekMessage(&msg,NULL,WM_TIMER,WM_TIMER,PM_REMOVE) ;
- if (msg.message == WM_TIMER || alarm_aborted)
- {
- KillTimer(NULL, alrm->crono);
- alrm->crono = 0;
- }
- }
- return !alrm->crono || alarm_aborted;
-}
-
-
-void thr_end_alarm(thr_alarm_t *alrm_ptr)
-{
- thr_alarm_t alrm= *alrm_ptr;
- /* alrm may be zero if thr_alarm aborted with an error */
- if (alrm && alrm->crono)
-
- {
- KillTimer(NULL, alrm->crono);
- alrm->crono = 0;
- }
-}
-
-void end_thr_alarm(my_bool free_structures)
-{
- DBUG_ENTER("end_thr_alarm");
- alarm_aborted=1; /* No more alarms */
- DBUG_VOID_RETURN;
-}
-
-void init_thr_alarm(uint max_alarm)
-{
- DBUG_ENTER("init_thr_alarm");
- alarm_aborted=0; /* Yes, Gimmie alarms */
- DBUG_VOID_RETURN;
-}
-
-void thr_alarm_info(ALARM_INFO *info)
-{
- bzero((char*) info, sizeof(*info));
-}
-
-void resize_thr_alarm(uint max_alarms)
-{
-}
-
-#endif /* __WIN__ */
-
#endif
/****************************************************************************
@@ -955,4 +868,5 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
}
#endif /* !defined(DONT_USE_ALARM_THREAD) */
+#endif /* WIN */
#endif /* MAIN */