micke <[EMAIL PROTECTED]> wrote:

    micke> Thanks for the answer, but thats in libc? The functionality I search 
for is in the kernel.


    micke> Found this myself:

    micke> 
http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/syscall/lwp_sobj.c

    micke> The function lwp_block() have a sleepq_insert(&sqh->sq_queue, t); 
function that seems promising.


    micke> So is this correct? When a lwp/kthread gets blocked this function is 
the one called? So If I want to know the time when the thread gets inserted in 
the sleep queue, I just check it before the call to the 
sleepq_insert(&sqh->sq_queue, t) function?

    micke> Thanks

Micke,

you can use stable DTrace sched provider probes called sleep and wakeup.
They guarantee you that the timing you obtain will be correct
independent of implementation. Otherwise you need to check all the
places where sleep/wakeup probes are fired.

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

Reply via email to