From: Nikos Mavrogiannopoulos Date: Tue, 17 May 2011 20:49:38 +0000 (+0200) Subject: corrections in win32 version. X-Git-Tag: gnutls_2_99_2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f4ccce42d43f424d6418c7f1ad2a231e464a1b;p=thirdparty%2Fgnutls.git corrections in win32 version. --- diff --git a/src/benchmark-common.c b/src/benchmark-common.c index 6e64747033..b6b426ab4b 100644 --- a/src/benchmark-common.c +++ b/src/benchmark-common.c @@ -28,30 +28,30 @@ alarm_handler (LPVOID lpParameter) #define W32_ALARM_VARIABLES HANDLE wtimer = NULL, wthread = NULL; \ LARGE_INTEGER alarm_timeout = { 0 , 0 } #define W32_ALARM_TRIGGER(timeout, leave) { \ - wtimer = CreateWaitableTimer (NULL, TRUE, NULL); \ - if (wtimer == NULL) \ + st->wtimer = CreateWaitableTimer (NULL, TRUE, NULL); \ + if (st->wtimer == NULL) \ { \ fprintf (stderr, "error: CreateWaitableTimer %u\n", GetLastError ()); \ leave; \ } \ - wthread = CreateThread (NULL, 0, alarm_handler, &wtimer, 0, NULL); \ - if (wthread == NULL) \ + st->wthread = CreateThread (NULL, 0, alarm_handler, &st->wtimer, 0, NULL); \ + if (st->wthread == NULL) \ { \ fprintf (stderr, "error: CreateThread %u\n", GetLastError ()); \ leave; \ } \ alarm_timeout.QuadPart = timeout * 10000000; \ - if (SetWaitableTimer (wtimer, &alarm_timeout, 0, NULL, NULL, FALSE) == 0) \ + if (SetWaitableTimer (st->wtimer, &alarm_timeout, 0, NULL, NULL, FALSE) == 0) \ { \ fprintf (stderr, "error: SetWaitableTimer %u\n", GetLastError ()); \ leave; \ } \ } #define W32_ALARM_CLEANUP { \ - if (wtimer != NULL) \ - CloseHandle (wtimer); \ - if (wthread != NULL) \ - CloseHandle (wthread);} + if (st->wtimer != NULL) \ + CloseHandle (st->wtimer); \ + if (st->wthread != NULL) \ + CloseHandle (st->wthread);} #endif static void