On Mon, May 21, 2007 at 10:21:48PM -0400, Michael Dickens wrote: > On May 21, 2007, at 3:04 PM, Eric Blossom wrote: > >We have the capability to request real time scheduling (currently only > >on systems that implment POSIX sched_setscheduler), but generally > >avoid it by default, since folks have been known to frequently blow > >their own feet off. > > Looking at gnuradio-core/lib/src/runtime/gr_realtime.cc, it seems > that the running thread's scheduling is set to FIFO and the priority > is maximized.
The priority is set to the midpoint of the FIFO range, not maximized. > If this is "all" that's being done, then this can be ports to > pthread's (also supposedly POSIX), as on some BSD (and thus OSX) > systems. Instead of "sched_setscheduler" (which sets both the > scheduling policy and priority), use "pthread_attr_setschedparam" > and "pthread_attr_setschedpolicy". I will look into it. - MLD Michael, I don't think we want to be creating new threads just to try to set real time scheduling. I strongly suspect that if a pthread implementation supports pthread_attr_setschedpolicy with SCHED_RR or SCHED_FIFO, then they will also implement sched_setscheduler with SCHED_RR or SCHED_FIFO. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio