diff options
| author | Eli Zaretskii | 2012-10-27 13:21:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-27 13:21:26 +0200 |
| commit | 6c16c13ed185acf16dc8f1c6ba458f1e59328e84 (patch) | |
| tree | 879877acff6356de8e86be0679b04859d4d50451 /src/ChangeLog | |
| parent | caa5e5a44dd23b77dfc38f7dd8b63af241149410 (diff) | |
| download | emacs-6c16c13ed185acf16dc8f1c6ba458f1e59328e84.tar.gz emacs-6c16c13ed185acf16dc8f1c6ba458f1e59328e84.zip | |
Fix w32 implementation of itimers: overflow and ITIMER_PROF.
Avoid overflow in w32 implementation of interval timers. When
possible, for ITIMER_PROF count only times the main thread
actually executes.
src/w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
ULONGLONG types. Likewise for all the other data which was
previously clock_t.
(GetThreadTimes_Proc): New typedef.
(w32_get_timer_time): New function, returns a suitable time value
for the timer.
(timer_loop): Enter critical section when accessing ULONGLONG
values of the itimer_data struct, as these accesses are no longer
atomic. Call 'w32_get_timer_time' instead of 'clock'.
(init_timers): Initialize s_pfn_Get_Thread_Times.
(start_timer_thread): Don't assign itimer->caller_thread here.
(getitimer): Assign itimer->caller_thread here.
(setitimer): Always call getitimer to get the value of ticks_now.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bf519556334..2efebc6754d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2012-10-27 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | Avoid overflow in w32 implementation of interval timers. When | ||
| 4 | possible, for ITIMER_PROF count only times the main thread | ||
| 5 | actually executes. | ||
| 6 | * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now | ||
| 7 | ULONGLONG types. Likewise for all the other data which was | ||
| 8 | previously clock_t. | ||
| 9 | (GetThreadTimes_Proc): New typedef. | ||
| 10 | (w32_get_timer_time): New function, returns a suitable time value | ||
| 11 | for the timer. | ||
| 12 | (timer_loop): Enter critical section when accessing ULONGLONG | ||
| 13 | values of the itimer_data struct, as these accesses are no longer | ||
| 14 | atomic. Call 'w32_get_timer_time' instead of 'clock'. | ||
| 15 | (init_timers): Initialize s_pfn_Get_Thread_Times. | ||
| 16 | (start_timer_thread): Don't assign itimer->caller_thread here. | ||
| 17 | (getitimer): Assign itimer->caller_thread here. | ||
| 18 | (setitimer): Always call getitimer to get the value of ticks_now. | ||
| 19 | |||
| 1 | 2012-10-26 Eli Zaretskii <eliz@gnu.org> | 20 | 2012-10-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 21 | ||
| 3 | * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of | 22 | * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of |