I have created 2 thread In one thread iam reading data through serial.once it read it will go to the second thread.But It seems it never comes out of the first thread itself(read_gps).
my program goes like this
Code:
void CScenGenDoc::OnControlSerialin()
{
upwin=true;
LPVOID param= NULL;
LPVOID para=NULL;
int a;
GPS_READ =::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)read_gps(),(LPVOID) param, 0,NULL);
GPS_PARSE =::CreateThread(NULL, 0,(LPTHREAD_START_ROUTINE)frameparse(),(LPVOID) para, 0,NULL);
}
Code:
int read_gps()
{
while(1)
{
bool read=true;
}
}
Code:
int frameparse()
{
while(1)
{
if(read==true)
{
----
----
}
}