Send notifications to ExtUI for M0/M1 (#13344)
- Send notifications to ExtUI for M0/M1 - wait_for_user can be non-volatile (not changed by interrupt) C / C++ compilers don't optimize away reads of non-volatile variables when a function call is used between accesses, because *any* variable could be changed by the function call. Since `wait_for_user` can't be changed without a function call, it should be non-volatile so the compiler can optimize away cases where it is read more than once without an intervening function call.
This commit is contained in:
committed by
Scott Lahteine
parent
00fc43144a
commit
60e82e3929
@ -183,7 +183,7 @@ volatile bool wait_for_heatup = true;
|
||||
|
||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||
#if HAS_RESUME_CONTINUE
|
||||
volatile bool wait_for_user; // = false;
|
||||
bool wait_for_user; // = false;
|
||||
#endif
|
||||
|
||||
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
|
Reference in New Issue
Block a user