Omkiran,
See responses below...
Regards,
- Rob
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Omkiran Sharma
Sent: Wednesday, June 25, 2008 5:53 AM
To: [email protected]
Subject: Premption of DSP side codecs.
All,
Is there any way apart from having two threads on the DSP with
different priorities for one thread to pre-empt another.
Here is the problem:
I have two codec instances of a codec which is pre-emptable. I
am guessing each gets its own thread on DSP. Is there any way for these
two threads to run concurrently on the DSP?
For two tasks of the same priority, the running task will continue to
run until it somehow voluntarily gives up the CPU, by either a
SEM_pend() (or derivative) or TSK_yield(). For example, if a higher
priority task preempts a low priority task, and there is more than one
task of low priority that are ready, then the original low priority task
will continue to run after the higher priority task blocks.
There is no time slicing in BIOS, although a time slicing scheme can be
implemented by the user by calling TSK_yield() from a timer interrupt.
As far as I know, the only way one thread gets pre-empted today
on the bios is that if a higher priority thread arrives.
Correct.
Another way would be for a thread to give itself up and I think
there is a way of one thread to yield itself. But will this gaurantee
that the other thread (at the same priority level) and not itself gets
picked up for execution?
When a BIOS task calls TSK_yield(), it is guaranteed that the "next"
ready task of the same priority will run. The task calling TSK_yield()
will be placed at the end of that priority's ready queue. Keep in mind
that if there are no other tasks of that priority ready to run, the
calling task will simply keep running.
Regards,
Omkiran
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source