diff options
author | eb | 2008-09-23 21:57:31 +0000 |
---|---|---|
committer | eb | 2008-09-23 21:57:31 +0000 |
commit | 801b22a99512ed3dfd2b92bfc597bfc3451ccbc9 (patch) | |
tree | d515b24be4fb7feec2ff46da755e2d7e80bd2650 | |
parent | 16699b8ac2ab0c98ad3593b573e409ce39f9eb7c (diff) | |
download | gnuradio-801b22a99512ed3dfd2b92bfc597bfc3451ccbc9.tar.gz gnuradio-801b22a99512ed3dfd2b92bfc597bfc3451ccbc9.tar.bz2 gnuradio-801b22a99512ed3dfd2b92bfc597bfc3451ccbc9.zip |
usrp2 work-in-progress
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9643 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r-- | gruel/src/lib/realtime.cc | 8 | ||||
-rw-r--r-- | usrp2/host/lib/usrp2_impl.cc | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gruel/src/lib/realtime.cc b/gruel/src/lib/realtime.cc index d1907b3c1..7397cf3d3 100644 --- a/gruel/src/lib/realtime.cc +++ b/gruel/src/lib/realtime.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007 Free Software Foundation, Inc. + * Copyright 2006,2007,2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -73,6 +73,9 @@ namespace gruel { int max_real_pri = sched_get_priority_max(policy); int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri); + // FIXME check hard and soft limits with getrlimit, and limit the value we ask for. + // fprintf(stderr, "pthread_setschedparam: policy = %d, pri = %d\n", policy, pri); + struct sched_param param; memset (¶m, 0, sizeof (param)); param.sched_priority = pri; @@ -106,6 +109,9 @@ namespace gruel { int max_real_pri = sched_get_priority_max(policy); int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri); + // FIXME check hard and soft limits with getrlimit, and limit the value we ask for. + // fprintf(stderr, "sched_setscheduler: policy = %d, pri = %d\n", policy, pri); + int pid = 0; // this process struct sched_param param; memset(¶m, 0, sizeof(param)); diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc index 68cf676c6..eb52242f8 100644 --- a/usrp2/host/lib/usrp2_impl.cc +++ b/usrp2/host/lib/usrp2_impl.cc @@ -856,6 +856,10 @@ namespace usrp2 { iov[1].iov_base = const_cast<uint32_t *>(&items[n]); iov[1].iov_len = i * sizeof(uint32_t); + size_t total = iov[0].iov_len + iov[1].iov_len; + if (total < 64) + fprintf(stderr, "usrp2::tx_raw: FIXME: short packet: %zd items (%zd bytes)\n", i, total); + if (d_eth_buf->tx_framev(iov, 2) != eth_buffer::EB_OK){ return false; } |