On Sun, Nov 8, 2009 at 10:18 PM, Kapil Agrawal <kapil....@gmail.com> wrote:
> have to wait in thd_w again and again in a while loop polling for the data > to be pushed queue from thd_r. Because of this polling using while, huge > CPU > is getting consumed. > I've forgotten my multi-threaded programming, but isn't there a semaphore or other such data structure that exists just for this purpose? thr_r sleeps on the semaphore, and thr_w wakes it up when there is data? A check of man pages should definitely help you find the appropriate mutex based datastructure? navin. _______________________________________ Pune GNU/Linux Users Group Mailing List