![](/media/cache/group/mbed-logo-square-512_3.png.50x50_q85.png)
semaphore example
Diff: main.cpp
- Revision:
- 4:ec4791bc6554
- Parent:
- 1:bdf73f017a77
- Child:
- 5:574f47121e8e
diff -r 02e47d35a686 -r ec4791bc6554 main.cpp --- a/main.cpp Tue Jun 04 16:05:26 2013 +0100 +++ b/main.cpp Wed Jan 11 14:39:06 2017 +0000 @@ -13,8 +13,11 @@ } int main (void) { - Thread t2(test_thread, (void *)"Th 2"); - Thread t3(test_thread, (void *)"Th 3"); - + Thread t2; + Thread t3; + + t2.start(callback(test_thread, (void *)"Th 2")); + t3.start(callback(test_thread, (void *)"Th 3")); + test_thread((void *)"Th 1"); }