emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110691: Use 'volatile' types for com


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110691: Use 'volatile' types for communications between timer thread and main thread.
Date: Sat, 27 Oct 2012 21:32:30 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110691
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-27 21:32:30 +0200
message:
  Use 'volatile' types for communications between timer thread and main thread.
modified:
  src/ChangeLog
  src/w32proc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-10-27 11:21:26 +0000
+++ b/src/ChangeLog     2012-10-27 19:32:30 +0000
@@ -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.

=== modified file 'src/w32proc.c'
--- a/src/w32proc.c     2012-10-27 19:20:02 +0000
+++ b/src/w32proc.c     2012-10-27 19:32:30 +0000
@@ -245,9 +245,9 @@
    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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]