how to use specific context before thread switch in linux

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

hello guys , i have a problem

i am porting ucosii to linuxbox with threads method.

I want to use 2 threads. One thread called "ISR-Thread" which simulate
ISR ,  and the other thread called "Task-Thread" includes all tasks used
by ucosii and each task has their own stack and register context.

suppose there are two tasks in "Task-Thread" which are "a-Task" and
"b-Task". And "a-Task" is running and "b-Task" is not running  when
program jump to "ISR-Thread" from "Task-Thread" to do with interrupt.

But something changes and program should run "b-task" instead of
"a-stask" when program return form "ISR-Thread" to "Task-Thread".

My problem is how to jump directly to "b-task" instead of "a-stask" when
program returns form "ISR-Thread" to "Task-Thread"??

And should I modify the saved context of "Task-Thread" or not before
program returns form "ISR-Thread" to "Task-Thread" and how to do it??

thanks in advance



--
To contact me , send mail to 'goldares -att- gmail -dott- com`

Site Timeline