On Thu, Aug 12, 2004 at 06:30:04PM +0530, Amol Kailash wrote:
> Hi Greg,
>               I have a bluetooth stack as a shared object. While starting
> the stack I initiate a pthread to read from the tty driver in a loop. The
> main thread meanwhile sends a HCI reset packet to the tty driver using the
> write function as shown in the code stub below. Now my problem is when the
> dcb->c_cc[VMIN] = 1, the read function never returns at all, even after I
> added synchornization so that the first read executes only after the
> usb_write function writes a reset packet. So I set dcb->c_cc[VMIN] = 0, now
> read returns alright, but never returns a single byte. Will it have
> something to do with the bluetooth tty driver and some issues with the tty
> buffer that it uses or would it be some sort of a timing problem with the
> read thread syncronization ? And how can I go about solving this ?

I really don't know, sorry.  Odds are it's a syncronization issue.  Does
it work without 2 threads?

thanks,

greg k-h


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to