Hi Micke,
micke wrote:
> the program I want to run is:
>
> int main(void) {
>     rtparms_t *p;
>     long ret;
>     ret = priocntl(P_LWPID, 0, PC_SETXPARMS, "RT", RT_KY_PRI, 10);
>     printf("ret1: %d, errno %d\n", ret, errno);
>     ret = priocntl(P_PID, 0, PC_GETXPARMS, "RT", RT_KY_PRI, p);
>   
Where is p initialized?  Did you mean "rtparms_t p;" and the 
priocntl(...PC_GETXPARMS, ...&p);"?
I think Darren answered your question, but this is the problem with this 
code.
max

>     printf("ret2: %d\n", ret);
>     ret = priocntl(P_PID, 0, PC_GETXPARMS, "RT", RT_KY_TQSECS, p);
>     printf("ret3: %d\n", ret);
>     ret = priocntl(P_PID, 0, PC_GETXPARMS, "RT", RT_KY_TQNSECS, p);
>     printf("ret4: %d\n", ret);
>     printf("\nwhats my prio: %d\n", p->rt_pri);
>     printf("\nwhats my tq secs: %d\n", p->rt_tqsecs);
>     printf("\nwhats my tq nsecs: %d\n", p->rt_tqnsecs);
>     return 0;
> }
>
> I compile and run then I get:
>
> ret1: -1, errno 22
> ret2: -1
> ret3: -1
> ret4: -1
>
> whats my prio: -1
>
> whats my tq secs: -1
>
> whats my tq nsecs: 134511772
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> opensolaris-code mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
>
>   

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to