Clean up w32 timer thread code in the hope of solving bug #12832.
commitf7a83d880088ea133bd70ca10ebafcef86e83ea0
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)
tree012aa305355229bc4d662b411a5b2ad2e8c49af7
parentc19ea6a6f446778b5f28fbcc0d9681354037ddcc
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