fdasfasd

Dependencies:   mbed-rtos mbed

Fork of rtos_mutex by mbed official

Files at this revision

API Documentation at this revision

Comitter:
MaxAigner
Date:
Sun Jan 18 14:19:44 2015 +0000
Parent:
4:192fef923dbc
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 192fef923dbc -r c1722555cc45 main.cpp
--- a/main.cpp	Tue Jun 04 16:03:01 2013 +0100
+++ b/main.cpp	Sun Jan 18 14:19:44 2015 +0000
@@ -1,11 +1,16 @@
 #include "mbed.h"
 #include "rtos.h"
+#include <string>
+#include "iostream"
 
 Mutex stdio_mutex; 
+string teststring;
 
 void notify(const char* name, int state) {
+    int counter;
     stdio_mutex.lock();
-    printf("%s: %d\n\r", name, state);
+    counter ++;
+    teststring = "hallo welt %a" , counter; 
     stdio_mutex.unlock();
 }
 
@@ -18,7 +23,13 @@
 
 int main() {
     Thread t2(test_thread, (void *)"Th 2");
-    Thread t3(test_thread, (void *)"Th 3");
+
+    while (1)
+    {
+        stdio_mutex.lock();
+        printf( "%s" , teststring);
+        stdio_mutex.unlock();
+        wait_ms(100);
+        }
     
-    test_thread((void *)"Th 1");
 }
diff -r 192fef923dbc -r c1722555cc45 mbed-rtos.lib
--- a/mbed-rtos.lib	Tue Jun 04 16:03:01 2013 +0100
+++ b/mbed-rtos.lib	Sun Jan 18 14:19:44 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed-rtos/#9387d4c49609
diff -r 192fef923dbc -r c1722555cc45 mbed.bld
--- a/mbed.bld	Tue Jun 04 16:03:01 2013 +0100
+++ b/mbed.bld	Sun Jan 18 14:19:44 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file