Clean up w32 timer thread code in the hope of solving bug #12832.
commit730b2d8f6b5851dc462b79b8bd48068c1b9f1932
authorEli Zaretskii <eliz@gnu.org>
Wed, 14 Nov 2012 16:41:43 +0000 (14 18:41 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 14 Nov 2012 16:41:43 +0000 (14 18:41 +0200)
treef608a34a8622871ad0742a2959fc435a94f468b5
parent921c067f4309c3eab0aa536723683bada6802545
Clean up w32 timer thread code in the hope of solving bug #12832.

 src/w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
 use the same value of thread handle.
 (start_timer_thread): If the timer thread exited (due to error),
 clean up by closing the two handles it used.  Duplicate the caller
 thread's handle here, so it gets duplicated only once, when
 launching the timer thread.  Set priority of the timer thread, not
 the caller thread.
 (getitimer): Don't duplicate the caller thread's handle here.
src/ChangeLog
src/w32proc.c