From f2fd15a331fd3b5b63f0dc6f492651330adcedf9 Mon Sep 17 00:00:00 2001 From: Guillaume Denneulin Date: Thu, 20 Dec 2012 17:53:29 +0100 Subject: PFW: Add resync mechanism if a subsystem needs resync BZ: 76267 In the case of a hw subsystems reset, it's possible that its parameter managed by the PFW may not be aligned with the PFW blackboard. A re-synchronization mechanism is implemented to ensure that the subsystem is re-synchronized on the next configurations application. Change-Id: I032150955d25a7020cf494e69456897b4c157916 Signed-off-by: Guillaume Denneulin Reviewed-on: http://android.intel.com:8080/83015 Reviewed-by: Rocard, KevinX Reviewed-by: Centelles, Sylvain Tested-by: Dixon, CharlesX Reviewed-by: cactus Tested-by: cactus --- parameter/SystemClass.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'parameter/SystemClass.cpp') diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp index dbce345..bf98cb1 100644 --- a/parameter/SystemClass.cpp +++ b/parameter/SystemClass.cpp @@ -232,6 +232,26 @@ const CSubsystemLibrary* CSystemClass::getSubsystemLibrary() const return _pSubsystemLibrary; } +// Fill syncer-set with syncers from subsytems that need resync +void CSystemClass::checkForSubsystemsToResync(CSyncerSet& syncerSet) +{ + uint32_t uiNbChildren = getNbChildren(); + uint32_t uiChild; + + for (uiChild = 0; uiChild < uiNbChildren; uiChild++) { + + CSubsystem* pSubsystem = static_cast(getChild(uiChild)); + + // Collect and consume the need for a resync + if (pSubsystem->needResync(true)) { + + log_info("Resynchronizing subsystem: %s", pSubsystem->getName().c_str()); + // get all subsystem syncers + pSubsystem->fillSyncerSet(syncerSet); + } + } +} + bool CSystemClass::init(string& strError) { return base::init(strError); -- cgit v1.1