On 2013-01-20, Alan Corey <alan01...@gmail.com> wrote: > They seem to work for my programs, but I'm trying to use rtl_fm from > the osmocom group at http://sdr.osmocom.org/trac/wiki/rtl-sdr. This > machine boots into OpenBSD and an old Debian Linux and the program > runs fine under Linux. If I can figure out how to make it work under > OpenBSD I'd like to submit some ifdefs for it. > > The program is for software defined radio using a $20 dongle plugged > into a USB port that tunes 24 - 1700 MHz. It works under Linux and > Windows, but under OpenBSD the demodulation doesn't keep up with the > incoming data. The driver uses a callback routine when it has data, > which does a sem_post that should enable a demodulation thread. It > works after a fashion, but by the time it starts 5 or 6 more batches > of data have come along and most of them get lost (in OpenBSD). I > think maybe I need to change the priority on the thread if possible. > > I posted this question originally to StackOverflow: > http://stackoverflow.com/questions/14392158/pthread-priority-scheduling-under-openbsd > > Have I run into one of the shortcomings of pthreads as implemented in > 5.0? I'll probably upgrade to 5.3 when it comes out, but that > involves hours of sitting in a car using a public WiFi connection > which I don't plan to do until warmer weather. > > Alan >
I can't answer specifically for rtl_fm, but some other programs using threads and USB were pretty much useless with the userland-only thread library due to problems with FD blocking, which are no longer an issue following the move to kernel-backed threads. One specific example is spectrum-tools; the GUI parts did not work at all for me before this move, and now work reasonably well.