mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 01:15:06 +03:00
libcamera: pipeline_handler: Make lock() and unlock() thread-safe
The PipelineHandler lock() and unlock() functions are documented as thread-safe, but they're not. Fix them using a mutex. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
ec6921d7f7
commit
152adad97a
2 changed files with 8 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/base/mutex.h>
|
||||
#include <libcamera/base/object.h>
|
||||
|
||||
#include <libcamera/controls.h>
|
||||
|
@ -88,7 +89,8 @@ private:
|
|||
|
||||
const char *name_;
|
||||
|
||||
bool lockOwner_;
|
||||
Mutex lock_;
|
||||
bool lockOwner_ LIBCAMERA_TSA_GUARDED_BY(lock_); /* *Not* ownership of lock_ */
|
||||
|
||||
friend class PipelineHandlerFactory;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue