On Tue, Nov 12, 2013 at 02:52:53PM +0100, Bert Vermeulen wrote:
> 
> Once you've eliminated "fake" static serial ports -- the devices are
> just always there -- you can keep that list cached, right? Then it's
> just a matter of checking only for dynamic devices, or even devices
> that show up and aren't in the list of already handled ones.

Well, on all the OSes covered so far, permanently-installed ports are
found using the same enumeration mechanisms as any other type, and may
not even be easily distinguishable. So there's not really any
opportunity for caching just those ones.

The only instance in which I'm doing anything differently is for the
serial8250 driver on Linux, which just advertises a hardcoded number of
ports to the OS and requires an open & ioctl to tell which ones actually
exist [0]. I could cache that result, but it isn't a great idea because
there are multiple reasons the open can fail which might not be
permanent.


Martin

[0] This stinks, because PnP/ACPI should be able to provide this info,
    but nobody seems to care.

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to