Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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__)