On Tue, Jun 06, 2006 at 07:37:27PM -0700, Pavan Reddy wrote:
> Hi All,
>     I am trying to debug a conditional variable at this situation:
> 
> I have a daemon running and I am trying to send a signal to it thru 
> cv_signal()
> controlled by a conditional variable. The first request I sent to it works 
> fine
> and when it comes to the second request, I am not able to wake that daemon
> with cv_signal(). I am guessing that there is some problem with the 
> conditional
> variable and trying to debug that. I can see the daemon kernel thread 
> running. 
> 
> 
> There is a structure with a conditional variable
> 
> struct a {   
>    int ...;
>     ...
>     ...
>     kcondvar_t something;
> };
> 
> suppose if the address of "struct a" after allocation is 100 and the address 
> of
> conditional variable is 120.
> 
> Questions:
> 
> 1. If I do a "::wchaninfo", should that list the address of the conditional 
> variable
> as 120?
> 
> 2. ::wchaninfo  ==>  dump condition variable
> Does this dumps all the conditional variable addressess which are active at 
> that point
> time?

You might look at dtrace for this;  sched:::sleep will fire when a thread
sleeps on a condvar, and sched:::wakeup will fire when one thread wakes
another.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to