Hi All,
I am trying to porting RIOT to PsoC 5LP device.
For a single thread everything looks like good but when I create a different
thread, I could not see any context switching.
I created two threads which change led states. Threads are;
static void *led3Thread(void *arg)
{
while (1)
{
LED3_Write(!LED3_Read());
delay();
}
}
static void *led4Thread(void *arg)
{
while (1)
{
LED4_Write(!LED4_Read());
delay();
}
}
I have also added a delay function to sense changes on leds.
void delay(void)
{
for (int i = 0; i < 1000000; i++);
}
Threads looks like working as blocking. In general, led3Thread is started
before and only led3Thread is working. Never switch to Led4Thread (I could
not see changes on Led4).
If I dont create thread3, I can see changes on Led4.
So, Why am I not able to observe context switching? Is it normal behaviour
or not?
I have also tried sleep(), usleep() functions instead of my delay() function
but result(blocking) is same.
Sleep() and usleep() functions are working fine individually.
I dont have a different board to compare this behavior with a different
environment.
Regards.
Murat.
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel