On Wed, 31 Oct 2007, Darren J Moffat wrote:

> micke wrote:
>> :) ok, but it wont work, not don't "standard stuff" so ....

Still wondering why you are so desperate _NOT_ to use POSIX threads / 
_NOT_ to do portable programming ... care to explain that part ?

What's wrong with pthread_setschedparam() ? You've said initially that 
what you're trying to do is to call sched_setscheduler() for a thread. 
Thta's exactly what pthread_setschedparam() does, both on Linux and on 
Solaris ...

FrankH.

>>
>> 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
>

------------------------------------------------------------------------------
No good can come from selling your freedom, not for all the gold in the world,
for the value of this heavenly gift far exceeds that of any fortune on earth.
------------------------------------------------------------------------------
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to