lkml.org 
[lkml]   [2005]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectsched_setscheduler() and usage issues ....please help
Date

I am trying to set the SCHED_FIFO policy for my process.I am using
sched_setscheduler() function to do this.

I am following the correct syntax and running it as root process.I am using
the given syntax i.e.,
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p);
(SCHED_FIFO for the policy and priority in the range of 1 to 99 for p).

But the function returns with an value of -1. I am trying to call this
function from the user-space.

1) Is this usage correct?
2)How do I read the error code (i.e., text description of what kiind of
error occurred like for eg., ESRCH,EPERM,EINVAL).

Please help.

thanks
Arun

_________________________________________________________________
Don't know where to look for your life partner?
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Trust
BharatMatrimony.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.054 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site