Hi
On 04/02/06 04:50, Haris wrote:
Hey, what I want to do is to signal a thread after is scheduled and before is
descheduled. Do you know in which function the scheduling/descheduling of
kernel threads takes place? Is there any other way to notify a thread that is
scheduled/descheduled?
I am thinking that another way is to notify the user thread from the user
thread library on an upcall to the Scheduler Activation. Do you know what is
the path to the code of the thread library that accepts upcalls?
First, can you describe what it is you want to achieve with this and there may
well be a better way.
Dtrace can achieve this for you - its sched provider lets you observe when
a thread goes and and off cpu or on and off dispatch queue, and if you
run with the -w (allow destructive actions) option you can use
the raise() action to signal the associated process.
Of course nothing keep you on cpu while that signal is delivered and handled -
lots of
race conditions here.
Gavin
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code