error "Invalid argument" returned after call sched_setscheduler

the code is below and the was run on Solaris 9.

-----------------------------
struct sched_param param;

param.sched_priority = 99;
if(sched_setscheduler(0, SCHED_RR, &param) == -1)
{
perror("setting priority");
exit(1);
}
-------------------------------
after the function sched_setcheduler called, errno = EINVAL and error message is "Invalid argument".

What's the reason?
How can make it effect?

Thanks!

struct sched_param param;

param.sched_priority = 99;

What about the rest of the fields in 'param', are they initialised to zero or just random contents of the stack?