]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'volatile' types for communications between timer thread and main thread.
authorEli Zaretskii <eliz@gnu.org>
Sat, 27 Oct 2012 19:32:30 +0000 (21:32 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 27 Oct 2012 19:32:30 +0000 (21:32 +0200)
src/ChangeLog
src/w32proc.c

index 2efebc6754d76ef503db5935a6818c3df8822f3e..398d19fe6f21c1ec5d826ae548c39e7743246b46 100644 (file)
@@ -4,8 +4,8 @@
        possible, for ITIMER_PROF count only times the main thread
        actually executes.
        * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
-       ULONGLONG types.  Likewise for all the other data which was
-       previously clock_t.
+       'volatile ULONGLONG' types.  All the other data which was
+       previously clock_t is now ULONGLONG.  'terminate' is 'volatile int'.
        (GetThreadTimes_Proc): New typedef.
        (w32_get_timer_time): New function, returns a suitable time value
        for the timer.
index 6accf2224c583ca6c02a8fc77253dd1339e6f158..af656f915c741d5accf4820ecae3062b9fa474ed 100644 (file)
@@ -245,9 +245,9 @@ setpgrp (int pid, int gid)
    expires, after stopping the thread which installed the timer.  */
 
 struct itimer_data {
-  ULONGLONG expire;
-  ULONGLONG reload;
-  int terminate;
+  volatile ULONGLONG expire;
+  volatile ULONGLONG reload;
+  volatile int terminate;
   int type;
   HANDLE caller_thread;
   HANDLE timer_thread;