Revision dc2f14d7 host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
| b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp | ||
|---|---|---|
| 202 | 202 |
} |
| 203 | 203 |
|
| 204 | 204 |
UHD_INLINE bool wraparound_lt16(const boost::int16_t i0, const boost::int16_t i1){
|
| 205 |
if (i0 == i1) return false; |
|
| 206 |
const int s0 = boost::uint16_t(i0) >> 15; |
|
| 207 |
const int s1 = boost::uint16_t(i1) >> 15; |
|
| 208 |
if (s0 != s1) return boost::int16_t(i1 - i0) > 0; |
|
| 209 |
return boost::uint16_t(i0) < boost::uint16_t(i1); |
|
| 205 |
if (((i0 ^ i1) & 0x8000) == 0) //same sign bits |
|
| 206 |
return boost::uint16_t(i0) < boost::uint16_t(i1); |
|
| 207 |
return boost::int16_t(i1 - i0) > 0; |
|
| 210 | 208 |
} |
| 211 | 209 |
|
| 212 | 210 |
UHD_INLINE boost::uint32_t wait_for_ack(const boost::uint16_t seq_to_ack){
|
Also available in: Unified diff