struct lock_file: declare some fields volatile
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 8e25fce3d8286f2a8452e368fb8aaff463ae5dc7..c2ea6f15e6f5b7acf21abb95e7b1cd91a66473c6 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -575,10 +575,10 @@ extern int refresh_index(struct index_state *, unsigned int flags, const struct
 #define LOCK_SUFFIX_LEN 5
 
 struct lock_file {
-       struct lock_file *next;
+       struct lock_file *volatile next;
        volatile sig_atomic_t active;
-       int fd;
-       pid_t owner;
+       volatile int fd;
+       volatile pid_t owner;
        char on_list;
        char filename[PATH_MAX];
 };