libcamera: bound_method: Support connection types

Support all connection types in the BoundMethodBase::activePack()
method. To support this, add a semaphore to the InvokeMessage to signal
delivery.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-10-28 05:31:12 +02:00
parent df2518b2a3
commit 3d75cc1bd2
4 changed files with 49 additions and 5 deletions
+5
View File
@@ -15,6 +15,7 @@ namespace libcamera {
class BoundMethodBase;
class Object;
class Semaphore;
class Thread;
class Message
@@ -48,14 +49,18 @@ class InvokeMessage : public Message
{
public:
InvokeMessage(BoundMethodBase *method, void *pack,
Semaphore *semaphore = nullptr,
bool deleteMethod = false);
~InvokeMessage();
Semaphore *semaphore() const { return semaphore_; }
void invoke();
private:
BoundMethodBase *method_;
void *pack_;
Semaphore *semaphore_;
bool deleteMethod_;
};