diff --git a/Makefile b/Makefile index b47e0be..3a4ccb1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ CXXFLAGS += -ffunction-sections -fdata-sections CXXFLAGS += -fno-implicit-inline-templates -LD_LIBS := -lc -lgcc +LD_LIBS := -lc -lgcc -lpthread CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ diff --git a/src/main.cc b/src/main.cc index 1f1c385..3546f57 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,7 +1,28 @@ #include +#include + +void *fake_it(void *param) +{ + std::cout << "Hello " << __FUNCTION__ << "\r\n"; + return NULL; +} + +void *poller(void *param) +{ + std::cout << "Hello " << __FUNCTION__ << "\r\n"; + return NULL; +} + int main(void) { - std::cout << "Hello World!!!" << std::endl; + pthread_t it_thread, poll_thread; + + pthread_create(&it_thread, NULL, fake_it, NULL); + pthread_create(&poll_thread, NULL, poller, NULL); + std::cout << "Hello World!!!" << "\r\n"; + + pthread_join(it_thread, NULL); + pthread_join(poll_thread, NULL); return 0; }