sabme ua
/
mbed_gcc_version
for check gcc version.
Revision 2:50d77aa2ab58, committed 2015-10-22
- Comitter:
- mzta
- Date:
- Thu Oct 22 10:34:44 2015 +0000
- Parent:
- 1:74efec1a152d
- Commit message:
- Add test code for __sync_synchronize() compiling
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
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__)