add -l pthread
add #include <stdbool.h>
sample of ledTask and swTask(polling)