This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use volatile when replacing Interlocked*


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

|> 2008-07-12  Eric Blake  <ebb9@byu.net>
|>
|> 	Fix usage of recently fixed Interlocked* functions.
|> 	* winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add
|> 	volatile qualifier, to match Interlocked* functions.
|
| You missed to attach the patch, apparantly :)

I hate it when that happens.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh41t8ACgkQ84KuGfSFAYCGiwCeNuRKSXc/TFaiNIX//Y2YoDOB
pBgAnR5jA1VcS6KODQe+Fof7I8HBLg+2
=i9Kb
-----END PGP SIGNATURE-----
Index: winbase.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/winbase.h,v
retrieving revision 1.13
diff -u -p -r1.13 winbase.h
--- winbase.h	7 Jun 2005 19:31:42 -0000	1.13
+++ winbase.h	12 Jul 2008 12:20:43 -0000
@@ -1,6 +1,6 @@
 /* winbase.h
 
-   Copyright 2002, 2003, 2004 Red Hat, Inc.
+   Copyright 2002, 2003, 2004, 2008 Red Hat, Inc.
 
 This software is a copyrighted work licensed under the terms of the
 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
@@ -12,7 +12,7 @@ details. */
 #define _WINBASE2_H
 
 extern __inline__ long
-ilockincr (long *m)
+ilockincr (volatile long *m)
 {
   register int __res;
   __asm__ __volatile__ ("\n\
@@ -24,7 +24,7 @@ ilockincr (long *m)
 }
 
 extern __inline__ long
-ilockdecr (long *m)
+ilockdecr (volatile long *m)
 {
   register int __res;
   __asm__ __volatile__ ("\n\
@@ -36,7 +36,7 @@ ilockdecr (long *m)
 }
 
 extern __inline__ long
-ilockexch (long *t, long v)
+ilockexch (volatile long *t, long v)
 {
   register int __res;
   __asm__ __volatile__ ("\n\
@@ -47,7 +47,7 @@ ilockexch (long *t, long v)
 }
 
 extern __inline__ long
-ilockcmpexch (long *t, long v, long c)
+ilockcmpexch (volatile long *t, long v, long c)
 {
   register int __res;
   __asm__ __volatile__ ("\n\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]