Re: how to check whether other threads are waiting ..

Jeff Hartmann (jhartmann@valinux.com)
Fri, 10 Aug 2001 15:49:22 -0600


Imran Badr wrote:

> Hi,
>
> How can I find out in my kernel code that if mutiple threads are waiting for
> a particular semaphore?
>
> Thanks,
> imran.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
I haven't looked at the semaphore implementation for other arch's
closely, but on the ia32 there is a waitqueue in struct semaphore.
Examine that to detrimine if there are processes waiting, how many, etc.

-Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/