[libcamera-devel,1/2] ipa: raspberrypi: Remove atomic variable from Algorithm class
diff mbox series

Message ID 20210208094036.6846-2-david.plowman@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi IPA maintenance (final part)
Related show

Commit Message

David Plowman Feb. 8, 2021, 9:40 a.m. UTC
Pause() and Resume() are only called synchronously so paused_ does not
need to be atomic.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/controller/algorithm.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Laurent Pinchart Feb. 8, 2021, 3:48 p.m. UTC | #1
Hi David,

Thank you for the patch.

On Mon, Feb 08, 2021 at 09:40:35AM +0000, David Plowman wrote:
> Pause() and Resume() are only called synchronously so paused_ does not
> need to be atomic.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/ipa/raspberrypi/controller/algorithm.hpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/ipa/raspberrypi/controller/algorithm.hpp b/src/ipa/raspberrypi/controller/algorithm.hpp
> index e9b040c7..5123c87b 100644
> --- a/src/ipa/raspberrypi/controller/algorithm.hpp
> +++ b/src/ipa/raspberrypi/controller/algorithm.hpp
> @@ -12,7 +12,6 @@
>  #include <string>
>  #include <memory>
>  #include <map>
> -#include <atomic>
>  
>  #include "controller.hpp"
>  
> @@ -46,7 +45,7 @@ public:
>  
>  private:
>  	Controller *controller_;
> -	std::atomic<bool> paused_;
> +	bool paused_;
>  };
>  
>  // This code is for automatic registration of Front End algorithms with the

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/algorithm.hpp b/src/ipa/raspberrypi/controller/algorithm.hpp
index e9b040c7..5123c87b 100644
--- a/src/ipa/raspberrypi/controller/algorithm.hpp
+++ b/src/ipa/raspberrypi/controller/algorithm.hpp
@@ -12,7 +12,6 @@ 
 #include <string>
 #include <memory>
 #include <map>
-#include <atomic>
 
 #include "controller.hpp"
 
@@ -46,7 +45,7 @@  public:
 
 private:
 	Controller *controller_;
-	std::atomic<bool> paused_;
+	bool paused_;
 };
 
 // This code is for automatic registration of Front End algorithms with the