Hi all,
I have tried to increase the thread priority in android native through “pthread_setschedparam ()” but it is returning error 22(EINVAL). Please find below the code I have used
struct sched_param param;
int policy;
CHECK_EQ(pthread_getschedparam(pthread_self(), &policy, ¶m),0);
param.sched_priority = -10;
CHECK_EQ(pthread_setschedparam(pthread_self(), policy, ¶m),0);//giving error
Can anyone please share the issue in above code or let me know the any other procedure to increase the thread priority?
Thanks and regards
Mahesh
I have tried to increase the thread priority in android native through “pthread_setschedparam ()” but it is returning error 22(EINVAL). Please find below the code I have used
On Tue, Jun 21, 2011 at 4:30 PM, fadden <fad...@android.com> wrote:
> If you make that change, then you should start getting the expected
> EPERM result, unless the thread has elevated privileges that allow it
> to raise its priority.
How would the thread ever get those elevated privileges under Android?
Assuming that the OP's thread is running as native code under an
Activity, I mean.
b.g.
--
Bill Gatliff
bg...@billgatliff.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Guys:
How would the thread ever get those elevated privileges under Android?
On Tue, Jun 21, 2011 at 4:30 PM, fadden <fad...@android.com> wrote:
> If you make that change, then you should start getting the expected
> EPERM result, unless the thread has elevated privileges that allow it
> to raise its priority.
Assuming that the OP's thread is running as native code under an
Activity, I mean.
b.g.
--
Bill Gatliff
bg...@billgatliff.com
On Wed, Jun 22, 2011 at 3:34 AM, David Turner <di...@android.com> wrote:
>> How would the thread ever get those elevated privileges under Android?
>>
> It can't
That was my understanding. Just making sure. :)