Hi Team,
Am using raspberry pi 3 and kernel version Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux, i written small application with 3 threads , one thread reading some battery status , second thread running adc values and on more threads reading gpio led's status etc, am running long run after one to two days second thread hang not running, how to debug this isuue , not even enter that thread. remain two threads running without any issues, please any one help why one thread is hang and how to debug this issue(c application).
code :
pthread_t thread, thread1, thread2;
pthread_create(&thread,NULL,&check_batterystatus, NULL);
pthread_create(&thread1,NULL,&adcdata_read, NULL);
pthread_create(&thread2,NULL,&check_ledstatus, NULL);
void * adcdata_read(void * arg)
{
while(1)
{
read adc data from dev system
}
}
void * check_ledstatus(void * arg)
{
while(1)
{
check the led and gpio status
}
}
void * check_batterystatus(void * arg)
{
while(1)
{
check the battery status
}
}
Regards,
Nv