Imported Upstream version 3.0.4
[debian/gnuradio] / gnuradio-core / src / lib / runtime / gr_realtime.cc
index a5b8b0477bb435f2b58c7b3338f1353352e8dbef..878411df296bb1291dcc3baf8f8a242c5af5df5f 100644 (file)
@@ -6,7 +6,7 @@
  * 
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  * 
  * GNU Radio is distributed in the hope that it will be useful,
@@ -39,7 +39,7 @@ gr_rt_status_t
 gr_enable_realtime_scheduling()
 {
   int policy = SCHED_FIFO;
-  int pri = (sched_get_priority_max (policy) - sched_get_priority_min (policy)) / 2;
+  int pri = (sched_get_priority_max (policy) + sched_get_priority_min (policy)) / 2;
   int pid = 0;  // this process
 
   struct sched_param param;