Commenting out this part removes the compile error:
What I have tried.
My device target is set to 6.1 in Particle Build, and the device is running 6.1.
I re-installed with the latest Particle Dev from particle website.
Other than those checks I’m stuck on what to do. These commands work just fine on the web IDE however, the program I have currently is very large with multiple files and trying to get in to web IDE would be very difficult.
This error was not showing up until 3/14/17. On 3/11/18 It compiled without error.
Is anyone else experiencing difficulty with Particle Dev and System_Thread() and System_Mode() ?
This might have something to do with a recent update to the Wiring preprocessor.
Can you try swapping around SYSTEM_MODE() and SYSTEM_THREAD(), adding/removing blank lines before/after, remove the semicolon after the instructions.