Statistics
| Branch: | Tag: | Revision:

root / gruel / src / lib / sys_pri.cc @ f1598295

History | View | Annotate | Download (1.6 kB)

1 8e1575e9 eb
/* -*- c++ -*- */
2 8e1575e9 eb
/*
3 8e1575e9 eb
 * Copyright 2008 Free Software Foundation, Inc.
4 8e1575e9 eb
 * 
5 8e1575e9 eb
 * This file is part of GNU Radio
6 8e1575e9 eb
 * 
7 8e1575e9 eb
 * GNU Radio is free software; you can redistribute it and/or modify
8 8e1575e9 eb
 * it under the terms of the GNU General Public License as published by
9 8e1575e9 eb
 * the Free Software Foundation; either version 3, or (at your option)
10 8e1575e9 eb
 * any later version.
11 8e1575e9 eb
 * 
12 8e1575e9 eb
 * GNU Radio is distributed in the hope that it will be useful,
13 8e1575e9 eb
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 8e1575e9 eb
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 8e1575e9 eb
 * GNU General Public License for more details.
16 8e1575e9 eb
 * 
17 8e1575e9 eb
 * You should have received a copy of the GNU General Public License along
18 8e1575e9 eb
 * with this program; if not, write to the Free Software Foundation, Inc.,
19 8e1575e9 eb
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 8e1575e9 eb
 */
21 8e1575e9 eb
22 8e1575e9 eb
#ifdef HAVE_CONFIG_H
23 8e1575e9 eb
#include <config.h>
24 8e1575e9 eb
#endif
25 8e1575e9 eb
#include <gruel/sys_pri.h>
26 8e1575e9 eb
27 8e1575e9 eb
namespace gruel {
28 8e1575e9 eb
29 8e1575e9 eb
  /*
30 8e1575e9 eb
   * These may need per-OS tweaking.
31 8e1575e9 eb
   *
32 8e1575e9 eb
   * Under linux virtual_pri ->        system_pri
33 8e1575e9 eb
   *   0 ->   0
34 8e1575e9 eb
   *   1 ->   5
35 8e1575e9 eb
   *   2 ->  10
36 8e1575e9 eb
   *   3 ->  15
37 8e1575e9 eb
   *   4 ->  20                // typically used by jack and pulse audio
38 8e1575e9 eb
   *   5 ->  25
39 8e1575e9 eb
   *   6 ->  30
40 8e1575e9 eb
   *   7 ->  35
41 8e1575e9 eb
   *   8 ->  40
42 8e1575e9 eb
   *   9 ->  45
43 8e1575e9 eb
   *  10 ->  50
44 8e1575e9 eb
   *  11 ->  54
45 8e1575e9 eb
   *  12 ->  59
46 8e1575e9 eb
   *  13 ->  64
47 8e1575e9 eb
   *  14 ->  69
48 8e1575e9 eb
   *  15 ->  74
49 8e1575e9 eb
   */
50 8e1575e9 eb
  rt_sched_param
51 8e1575e9 eb
  sys_pri::python()                { return rt_sched_param(0, RT_SCHED_RR); }
52 8e1575e9 eb
53 8e1575e9 eb
  rt_sched_param
54 8e1575e9 eb
  sys_pri::normal()                { return rt_sched_param(2, RT_SCHED_RR); }
55 8e1575e9 eb
56 8e1575e9 eb
  rt_sched_param
57 8e1575e9 eb
  sys_pri::gcell_event_handler(){ return rt_sched_param(5, RT_SCHED_FIFO); }
58 8e1575e9 eb
59 8e1575e9 eb
  rt_sched_param
60 8e1575e9 eb
  sys_pri::usrp2_backend()        { return rt_sched_param(6, RT_SCHED_FIFO); }
61 8e1575e9 eb
}