![](/media/cache/profiles/momo.jpg.50x50_q85.jpg)
for check gcc version.
Diff: main.cpp
- Revision:
- 2:50d77aa2ab58
- Parent:
- 1:74efec1a152d
diff -r 74efec1a152d -r 50d77aa2ab58 main.cpp --- a/main.cpp Thu Oct 22 10:14:15 2015 +0000 +++ b/main.cpp Thu Oct 22 10:34:44 2015 +0000 @@ -2,6 +2,20 @@ Serial pc(USBTX, USBRX); +int global; +bool complete; + +void worker_do_something(int i) { + global = i; + __sync_synchronize(); + complete = true; +} + +void wait_complete() { + while(!complete) {} + printf("%d\n", global); +} + int main() { pc.printf("ARMCC_VERSION=%d\n", __ARMCC_VERSION); #if defined(__GNUC__)