micke wrote:
> :) ok, but it wont work, not don't "standard stuff" so ....
>
> Any way just tried this:
>
> kthread_t *daemon;
> pcparms_t pcparms;
> rtparms_t *rtparmsp;
> id_t tid;
> int rt_id;
>
> rt_id = rt_class_id;
> pcparms.pc_cid = rt_id;
> rtparmsp = (struct rtparms *)pcparms.pc_clparms;
> rtparmsp->rt_pri = some_prio;
> rtparmsp->rt_tqsecs = RT_TQINF;
>
> daemon = (kthread_t *)pthread_self();
> tid = (id_t)&daemon->t_tid;
You don't need those two lines.
> if((priocntl(P_LWPID, tid, PC_SETPARMS, &pcparms)) != 0){
s/tid/P_MYID/
From priocntl(2)
An id value of P_MYID can be used in conjunction with the
idtype value to specify the LWP ID, parent process ID, pro-
cess group ID, session ID, task ID, class ID, user ID, group
ID, project ID, zone ID, or process contract ID of the cal-
ling LWP.
--
Darren J Moffat
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code