Many thanks for the information.
But unfortunately, for me nothing is working… (
I used “nice” in the script to increase the priority but failed to get the result. The same with the “setpriority” function call inside the resource manager module.
Let me explain the scenario,
I have a SINGLE Threaded resource manager, which spawns multiple threads to receive the data from H/w. This mechanism is semaphore based, means the ISR releases the semaphores and the receiving thread of the Resouce Manager blocks on this semaphore. On successful reception of the packet, the notification is sent to the application to issue the read command to get the packet.
The read and write functionality is the part of the main Resource manager process.
Now the problem is that I can increase the priority of these threads, but unable to increase the peiority of this Resource Manager process. And this is what I want to increase.
I used the following function to increase the priority of the resource manager task,
/* set its priority to 11 */
if(-1 == setpriority(PRIO_PGRP,0,11))
REPORT_ERROR("Could not set the priority to 11, [Error - %s]\n",strerror(errno));
But after loading the image, pidin shows the same old priority as 9.
Any idea / pointer how to do this!!
Many thanks in advance,