On Mon, Jun 15, 2009 at 9:30 PM,
<pcolodron@xxxxxxxx> wrote:
I have succesfully ported a PetaLinux v0.30 system in my Xilinx board. However, I think I am experiencing a priority inversion problem with a multi-threaded application (my system completely hangs and the console do not even receive the keystrokes).
I have looking at this post and you mentioned that the only sensible way to fix priority inversion was to implement a priority inheritance. I have been reading some things about this issue but I can not figure out which changes shoud I make to apply this priority ineritance to my system.
Should I modify the libpthreaed in order to change the way in which it locks the resources or can I scalate the thread priority in the user application? Could you give some hints about how to implement priority inheritance?
To be honest I wouldn't recommend it. You might like to try the patch that Falk posted a few weeks ago:
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2009/04/msg00124.html
Alternatively, reconsider why you are using threads of different priorities in the sam eapplication, and consider whether you couldn't do the same task with a flat priority structure, and make more sensible use of blocking primitives such as select() and poll() system calls, and so on.
Regards,
John
--