summaryrefslogtreecommitdiff
path: root/src/ipa/libipa
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/libipa')
-rw-r--r--src/ipa/libipa/fc_queue.cpp6
-rw-r--r--src/ipa/libipa/fc_queue.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ipa/libipa/fc_queue.cpp b/src/ipa/libipa/fc_queue.cpp
index 0365e919..44f9d866 100644
--- a/src/ipa/libipa/fc_queue.cpp
+++ b/src/ipa/libipa/fc_queue.cpp
@@ -36,6 +36,12 @@ namespace ipa {
*
* \var FrameContext::frame
* \brief The frame number
+ *
+ * \var FrameContext::underrun
+ * \brief Boolean flag that reports if the FrameContext has been accessed with
+ * a FCQeueu::get() call before being FCQueue::alloc()-ated. If the flag is set
+ * to True then the frame context needs to be initialized by algorithms to safe
+ * defaults as it won't be initialized with any non-user provided control.
*/
/**
diff --git a/src/ipa/libipa/fc_queue.h b/src/ipa/libipa/fc_queue.h
index a1d13652..d70ca960 100644
--- a/src/ipa/libipa/fc_queue.h
+++ b/src/ipa/libipa/fc_queue.h
@@ -22,6 +22,9 @@ template<typename FrameContext>
class FCQueue;
struct FrameContext {
+public:
+ bool underrun = false;
+
private:
template<typename T> friend class FCQueue;
uint32_t frame;
@@ -97,6 +100,7 @@ public:
* is called before alloc() by the IPA for frame#0.
*/
init(frameContext, frame);
+ frameContext.underrun = true;
return frameContext;
}
@@ -117,6 +121,7 @@ public:
<< "Obtained an uninitialised FrameContext for " << frame;
init(frameContext, frame);
+ frameContext.underrun = true;
return frameContext;
}