[okl4-developer] About blocking a thread

Harry Vennik htvennik at zonnet.nl
Sat Jul 12 21:30:45 EST 2008


Hi,

Depending on what the flag actually means in your program, you may  
want to use either a mutex or blocking IPC to block and wake up the  
thread. You may even be able to eliminate the need of the flag this way.

Regards,

Harry

Op 12-jul-2008, om 11:19 heeft kashin Lin het volgende geschreven:

> Hi,
>
> the scenario is:
>
> A thread needs to wait a flag to be turned on. instead of polling  
> it, the thread block itself (yeild CPU).
>
> when the flag is on, another thread or ISR wake up the thread. thus  
> the thread can continue it processing.
>
>
> does OKL4(Iguana) support the blocking operation?
>
> ex: yeild cpu, and the thread is moved to a wait_queue.
>
>      wake up, then the thread is moved back to run queue to be  
> scheduled
>
>
> p.s. i want to implement it in a iguana application.
>
>
> best regards,
>
> kashin
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer




More information about the Developer mailing list