August 2, 2015

Why posix thread is running only once ?

I have problem regarding executing thread program.

I develop a robot for that m using concept of threading for creating a real time scenario to avoid obstacle and sense smoke in the premises.

So the issue is, it runs only in the starting, after that it get disappear..
here is the code skeleton,

void *thread1()
while(smoke_detect()==1 || obstacle()==1)
stop the robot;

Please reply me,

Thanking you in advance,

Nitin Patil

Click Here!