Selaa lähdekoodia

internal.h: added 'volatile' for some members with multi-thread access

Evgeny Grin (Karlson2k) 5 vuotta sitten
vanhempi
sitoutus
1ad74ebc46
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      src/microhttpd/internal.h

+ 3 - 3
src/microhttpd/internal.h

@@ -1053,7 +1053,7 @@ struct MHD_Connection
   /**
    * Is the connection wanting to resume?
    */
-  bool resuming;
+  volatile bool resuming;
 };
 
 
@@ -1248,7 +1248,7 @@ struct MHD_UpgradeResponseHandle
    * @remark This flag could be changed from thread that process
    * connection's recv(), send() and response.
    */
-  bool clean_ready;
+  volatile bool clean_ready;
 };
 #endif /* UPGRADE_SUPPORT */
 
@@ -1598,7 +1598,7 @@ struct MHD_Daemon
   /*
    * Do we need to process resuming connections?
    */
-  bool resuming;
+  volatile bool resuming;
 
   /**
    * 'True' if some data is already waiting to be processed.