-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
The current RB_ATOMIC_* definitions for ESP8266 look like this
#define RB_ATOMIC_START do { uint32_t _savedIS = xt_rsil(15) ;
#define RB_ATOMIC_END xt_wsr_ps(_savedIS); } while(0);
If I have a code like this one:
do {
RB_ATOMIC_START
{
// .. do something
if(condition) {
break;
}
// .. do something
}
RB_ATOMIC_END
}
while(0)
The break inside the RB_ATOMIC code will be "silenced" and the code will misbehave. Isn't it better to have a definition without do { and } while(9) ?
Related to NicoHood/IRLremote#20
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels