Threads copy 2
Dependencies: SDFileSystem mbed-rtos mbed
Fork of FRDM-K64_Threads_copy by
main.cpp
- Committer:
- julioefajardo
- Date:
- 2016-11-16
- Revision:
- 4:8a7e0bc98db0
- Parent:
- 3:8647bf7682b2
File content as of revision 4:8a7e0bc98db0:
#include <stdio.h> #include "mbed.h" #include "SDFileSystem.h" #include "rtos.h" Thread *threads[4]; void worker(void const *args); int main(){ for(int i=0;i<4;i++){ threads[i] = new Thread(worker,(void *)(i+1)); Thread::wait(500); } while(1){ } } void worker(void const *args){ while (true) { Thread::wait(500); osThreadYield(); } }