mblack
I am working on project using Handyboard and IC.
i need to use Processes to do some synchoronization between some functions...i hv tried it,it did not work...
this is my code:
void main()
{
int PID1;
int PID2;
// start_process(Subroutine1(),1); //one millisecond.
// start_process(Subroutine2(),1);
// kill_process(PID1);
//kill_process(PID2);
while(1)
{
start_process(Subroutine1(),1000); //one millisecond.
start_process(Subroutine2(),1000);
}
}
void Subroutine1()
{
// printf("Welcome!!!");
//for(i=0;i<50;i++)
{
fd(0);
//fd(1);
msleep(500L);
}
}
void Subroutine2()
{
// for(j=0;j<50;j++)
{
bk(0);
// bk(1);
msleep(500L);
}
}
i need to use Processes to do some synchoronization between some functions...i hv tried it,it did not work...
this is my code:
void main()
{
int PID1;
int PID2;
// start_process(Subroutine1(),1); //one millisecond.
// start_process(Subroutine2(),1);
// kill_process(PID1);
//kill_process(PID2);
while(1)
{
start_process(Subroutine1(),1000); //one millisecond.
start_process(Subroutine2(),1000);
}
}
void Subroutine1()
{
// printf("Welcome!!!");
//for(i=0;i<50;i++)
{
fd(0);
//fd(1);
msleep(500L);
}
}
void Subroutine2()
{
// for(j=0;j<50;j++)
{
bk(0);
// bk(1);
msleep(500L);
}
}