3 * Copyright 2008 Free Software Foundation, Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "usrp2_thread.h"
24 #include "usrp2_impl.h"
25 #include <gruel/realtime.h>
26 #include <gruel/sys_pri.h>
29 #define USRP2_THREAD_DEBUG 1
33 usrp2_thread::usrp2_thread(usrp2::impl *u2) :
34 omni_thread(NULL, PRIORITY_HIGH),
39 usrp2_thread::~usrp2_thread()
41 // we don't own this, just forget it
52 usrp2_thread::run_undetached(void *arg)
54 if (gruel::enable_realtime_scheduling(gruel::sys_pri::usrp2_backend()) != gruel::RT_OK)
55 std::cerr << "usrp2: failed to enable realtime scheduling" << std::endl;
57 // This is the first code to run in the new thread context.