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.
Fork of rtos_mutex by
Revision 5:c1722555cc45, committed 2015-01-18
- Comitter:
- MaxAigner
- Date:
- Sun Jan 18 14:19:44 2015 +0000
- Parent:
- 4:192fef923dbc
- Commit message:
- test
Changed in this revision
--- 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"); }
--- 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
--- 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