[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7451 - gnuradio/branches/developers/jcorgan/deskew/gn
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7451 - gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime |
Date: |
Wed, 16 Jan 2008 02:59:17 -0700 (MST) |
Author: jcorgan
Date: 2008-01-16 02:59:16 -0700 (Wed, 16 Jan 2008)
New Revision: 7451
Modified:
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.cc
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.h
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
Log:
Adding flags to indicate buffer skew has occurred.
Modified:
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.cc
2008-01-16 08:04:39 UTC (rev 7450)
+++
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.cc
2008-01-16 09:59:16 UTC (rev 7451)
@@ -36,7 +36,8 @@
d_output_multiple (1),
d_relative_rate (1.0),
d_history(1),
- d_fixed_rate(false)
+ d_fixed_rate(false),
+ d_flags(0)
{
}
Modified:
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.h
===================================================================
---
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.h
2008-01-16 08:04:39 UTC (rev 7450)
+++
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_block.h
2008-01-16 09:59:16 UTC (rev 7451)
@@ -203,6 +203,17 @@
void set_fixed_rate(bool fixed_rate){ d_fixed_rate = fixed_rate; }
+ // These can be set or cleared by either the scheduler or the work function
+ int d_flags;
+ static const int s_skew_empty = 1 << 0;
+ static const int s_skew_full = 1 << 1;
+ void set_skew_empty() { d_flags |= s_skew_empty; }
+ void clr_skew_empty() { d_flags &= ~s_skew_empty; }
+ bool skew_empty_p() { return d_flags & s_skew_empty; }
+ void set_skew_full() { d_flags |= s_skew_full; }
+ void clr_skew_full() { d_flags &= ~s_skew_full; }
+ bool skew_full_p() { return d_flags & s_skew_full; }
+
// These are really only for internal use, but leaving them public avoids
// having to work up an ever-varying list of friends
Modified:
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
2008-01-16 08:04:39 UTC (rev 7450)
+++
gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
2008-01-16 09:59:16 UTC (rev 7451)
@@ -34,7 +34,7 @@
#include <stdio.h>
// must be defined to either 0 or 1
-#define ENABLE_LOGGING 0
+#define ENABLE_LOGGING 1
#if (ENABLE_LOGGING)
#define LOG(x) do { x; } while(0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7451 - gnuradio/branches/developers/jcorgan/deskew/gnuradio-core/src/lib/runtime,
jcorgan <=