***CODE***
void *t_thread(void *p){ some work }

rtparms_t rtp;
struct sched_param sp;
pthread_t t_1;

//Setting some params to rtp; 

pthread_create(&t_1, NULL, t_thread, NULL);
sp.sched_priority = 100;
pthread_setschedparam(t_1, SCHED_FIFO, &sp);
//Want to have RT-class prio 100

//Then I want to change the parameters of the thread I just created to the ones 
in rtp.

printf("\n**priocntl: %d\n", priocntl(P_LWPID, t_1, PC_SETPARMS, &rtp));
printf("Errno: %d\n", errno);
***CODE***

So I want to, via priocntl: change the parameters of a thread I just created 
and also put this thread in the RT class with prio 100.

What am I doing wrong here? priocntl returns -1 and errno is 22.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to