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.
main.cpp
- Committer:
- Jennifer Plunkett
- Date:
- 2018-02-02
- Revision:
- 7:755dee0042c3
- Parent:
- 5:574f47121e8e
File content as of revision 7:755dee0042c3:
#include "mbed.h"
Semaphore one_slot(1);
Thread t2;
Thread t3;
void test_thread(void const *name) {
while (true) {
one_slot.wait();
printf("%s\n\r", (const char*)name);
wait(1);
one_slot.release();
}
}
int main (void) {
t2.start(callback(test_thread, (void *)"Th 2"));
t3.start(callback(test_thread, (void *)"Th 3"));
test_thread((void *)"Th 1");
}