On 02/16/2014 05:30 PM, Scott Talbert wrote:
> On Sun, 16 Feb 2014, Phil Dibowitz wrote:
> 
>>> I don't think that is strange.  I think what happened in this case was -
>>> we got busy and queued up five packets.  Then we read all of them and got
>>> caught up.  So, at that point we're caught up and now blocking, waiting on
>>> the read thread to wake us up.  The next few packets are received while
>>> we're waiting for them.  But for some reason we still lost some.
>>
>> How did we pop a 6th packet off of the queue if we never queued one?
> 
> I don't know exactly where all your debug statements are to be able to 
> tell exactly what is going on.  My assumption was that, after the 5th 
> packet, we were in the situation where the the thread doing 
> hid_read_timeout() was waiting on the one reading the packets, so the 
> queue never got bigger than one.

Yeah, but even if we were in hid_read_timeout() when the packet comes in, we'd
still get an interrupt, jump into hid_report_callback(), pop it on the queue,
and then return so hid_read_timeout() could then return. Or at least that's
how I parse the code.

>> It's unclear to me what the solution here is... it seems like they're saying
>> have another thread that just constantly reads, i.e., "be faster" ?
> 
> It wasn't clear to me that there actually *is* a solution.  I don't know 
> what else the Run Loop is doing besides calling hid_report_callback when 
> it needs to.

I feel like we're missing something. There's a solution *somewhere* or USB
would just fail miserably on Macs...

-- 
Phil Dibowitz                             p...@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to