[{"id":652,"web_url":"https://patchwork.libcamera.org/comment/652/","msgid":"<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","date":"2019-01-28T10:58:04","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi All,\n\nOn 27/01/2019 00:22, Niklas Söderlund wrote:\n> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nCan we have at least a brief excerpt from the brief below here in the\ncommit message so that our git-log is valid and readable independently?\n\nHow about:\n\nExclusive access must be obtained before performing operations that\nchange the device state. Define an internal flag to track ownership and\nprovide a means of protecting functions that change device configuration.\n\n\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  include/libcamera/camera.h |  5 +++++\n>  src/libcamera/camera.cpp   | 39 +++++++++++++++++++++++++++++++++++++-\n>  2 files changed, 43 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index a2ded62de94814c4..7e358f8c0aa093cf 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -29,6 +29,9 @@ public:\n>  \n>  \tSignal<Camera *> disconnected;\n>  \n> +\tint acquire();\n> +\tvoid release();\n> +\n>  private:\n>  \tCamera(PipelineHandler *pipe, const std::string &name);\n>  \t~Camera();\n> @@ -38,6 +41,8 @@ private:\n>  \n>  \tstd::shared_ptr<PipelineHandler> pipe_;\n>  \tstd::string name_;\n> +\n> +\tbool acquired_;\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 9cec289282e4797b..500976b237bcbd2d 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -102,12 +102,14 @@ const std::string &Camera::name() const\n>   */\n>  \n>  Camera::Camera(PipelineHandler *pipe, const std::string &name)\n> -\t: pipe_(pipe->shared_from_this()), name_(name)\n> +\t: pipe_(pipe->shared_from_this()), name_(name), acquired_(false)\n>  {\n>  }\n>  \n>  Camera::~Camera()\n>  {\n> +\tif (acquired_)\n> +\t\tLOG(Camera, Error) << \"Removing camera while still in use\";\n>  }\n>  \n>  /**\n> @@ -127,4 +129,39 @@ void Camera::disconnect()\n>  \tdisconnected.emit(this);\n>  }\n>  \n> +/**\n> + * \\brief Acquire the camera device for exclusive access\n> + *\n> + * After opening the device with open(), exclusive access must be obtained\n> + * before performing operations that change the device state. This function is\n> + * not blocking, if the device has already been acquired (by the same or another\n> + * process) the -EBUSY error code is returned.\n> + *\n> + * Once exclusive access isn't needed anymore, the device should be released\n> + * with a call to the release() function.\n> + *\n> + * \\todo Implement exclusive access across processes.\n\nAha - ok - I was going to say \"but this code doesn't protect the device\"\n... and now I see the todo - so I'll let it pass.\n\nWhen we implement this - it would be nice to store some information\nabout the process who has acquired the device so that we can report\n\"who\" has the device if a request fails.\n\nI expect this will be useful when we debug the 'Who has locked the\ndevice and not released it' issues ... or if a process hangs with the\nacquire lock.\n\nIdeally we want to make this work in some way that if something kills\nthe process the lock is also released - as it will affect other processes.\n\nPerhaps if the 'owner' doesn't exist any more an acquire might succeed.\nWho knows  :-)\n\n\n> + *\n> + * \\return 0 on success or a negative error code on error.\n> + */\n> +int Camera::acquire()\n> +{\n> +\tif (acquired_)\n> +\t\treturn -EBUSY;\n> +\n> +\tacquired_ = true;\n> +\treturn 0;\n> +}\n> +\n> +/**\n> + * \\brief Release exclusive access to the camera device\n> + *\n> + * Releasing the camera device allows other users to acquire exclusive access\n> + * with the acquire() function.\n> + */\n> +void Camera::release()\n> +{\n> +\tacquired_ = false;\n> +}\n> +\n>  } /* namespace libcamera */\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 644B560DB5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 11:58:08 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CD1D285;\n\tMon, 28 Jan 2019 11:58:07 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548673087;\n\tbh=z+2o+DlZgtpAzgnPcX5Zvgwk2g0QtdhFnckCf52TTRY=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=GNwPYYMe8v6v2gmWtqsk6P15P3aUyBRcDPI6kQ8bV+Z3Le0Pwcg8tyP/YNu3XjMQN\n\tilE4l6OeQ9tMuC5O1KapNlpgC2HfjtByUVYpQXo1BIxEela+cq4rIoXAQUi6Tqoup1\n\tjDURs5VxrrbMTUpghH4wxqfSTn47IBUnePyVvADU=","Reply-To":"kieran.bingham@ideasonboard.com","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20190127002208.18913-1-niklas.soderlund@ragnatech.se>\n\t<20190127002208.18913-4-niklas.soderlund@ragnatech.se>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rY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ph/G/jwZcdS6Hkyt/esHPuHNwX4guqTbVEuRqbDzDI\n\t2DJO5FbxABEBAAGJAiUEGAEKAA8CGwwFAlnDlGsFCQeA/gIACgkQoR5GchCkYf1yYRAAq+Yo\n\tnbf9DGdK1kTAm2RTFg+w9oOp2Xjqfhds2PAhFFvrHQg1XfQR/UF/SjeUmaOmLSczM0s6XMeO\n\tVcE77UFtJ/+hLo4PRFKm5X1Pcar6g5m4xGqa+Xfzi9tRkwC29KMCoQOag1BhHChgqYaUH3yo\n\tUzaPwT/fY75iVI+yD0ih/e6j8qYvP8pvGwMQfrmN9YB0zB39YzCSdaUaNrWGD3iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","Date":"Mon, 28 Jan 2019 10:58:04 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.2.1","MIME-Version":"1.0","In-Reply-To":"<20190127002208.18913-4-niklas.soderlund@ragnatech.se>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Jan 2019 10:58:08 -0000"}},{"id":662,"web_url":"https://patchwork.libcamera.org/comment/662/","msgid":"<20190128215126.GB4332@pendragon.ideasonboard.com>","date":"2019-01-28T21:51:26","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Mon, Jan 28, 2019 at 10:58:04AM +0000, Kieran Bingham wrote:\n> On 27/01/2019 00:22, Niklas Söderlund wrote:\n> > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Can we have at least a brief excerpt from the brief below here in the\n> commit message so that our git-log is valid and readable independently?\n> \n> How about:\n> \n> Exclusive access must be obtained before performing operations that\n> change the device state. Define an internal flag to track ownership and\n> provide a means of protecting functions that change device configuration.\n\nSounds good to me.\n\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  include/libcamera/camera.h |  5 +++++\n> >  src/libcamera/camera.cpp   | 39 +++++++++++++++++++++++++++++++++++++-\n> >  2 files changed, 43 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > index a2ded62de94814c4..7e358f8c0aa093cf 100644\n> > --- a/include/libcamera/camera.h\n> > +++ b/include/libcamera/camera.h\n> > @@ -29,6 +29,9 @@ public:\n> >  \n> >  \tSignal<Camera *> disconnected;\n> >  \n> > +\tint acquire();\n> > +\tvoid release();\n> > +\n> >  private:\n> >  \tCamera(PipelineHandler *pipe, const std::string &name);\n> >  \t~Camera();\n> > @@ -38,6 +41,8 @@ private:\n> >  \n> >  \tstd::shared_ptr<PipelineHandler> pipe_;\n> >  \tstd::string name_;\n> > +\n> > +\tbool acquired_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > index 9cec289282e4797b..500976b237bcbd2d 100644\n> > --- a/src/libcamera/camera.cpp\n> > +++ b/src/libcamera/camera.cpp\n> > @@ -102,12 +102,14 @@ const std::string &Camera::name() const\n> >   */\n> >  \n> >  Camera::Camera(PipelineHandler *pipe, const std::string &name)\n> > -\t: pipe_(pipe->shared_from_this()), name_(name)\n> > +\t: pipe_(pipe->shared_from_this()), name_(name), acquired_(false)\n> >  {\n> >  }\n> >  \n> >  Camera::~Camera()\n> >  {\n> > +\tif (acquired_)\n> > +\t\tLOG(Camera, Error) << \"Removing camera while still in use\";\n> >  }\n> >  \n> >  /**\n> > @@ -127,4 +129,39 @@ void Camera::disconnect()\n> >  \tdisconnected.emit(this);\n> >  }\n> >  \n> > +/**\n> > + * \\brief Acquire the camera device for exclusive access\n> > + *\n> > + * After opening the device with open(), exclusive access must be obtained\n> > + * before performing operations that change the device state. This function is\n> > + * not blocking, if the device has already been acquired (by the same or another\n> > + * process) the -EBUSY error code is returned.\n> > + *\n> > + * Once exclusive access isn't needed anymore, the device should be released\n> > + * with a call to the release() function.\n> > + *\n> > + * \\todo Implement exclusive access across processes.\n> \n> Aha - ok - I was going to say \"but this code doesn't protect the device\"\n> ... and now I see the todo - so I'll let it pass.\n> \n> When we implement this - it would be nice to store some information\n> about the process who has acquired the device so that we can report\n> \"who\" has the device if a request fails.\n> \n> I expect this will be useful when we debug the 'Who has locked the\n> device and not released it' issues ... or if a process hangs with the\n> acquire lock.\n> \n> Ideally we want to make this work in some way that if something kills\n> the process the lock is also released - as it will affect other processes.\n> \n> Perhaps if the 'owner' doesn't exist any more an acquire might succeed.\n> Who knows  :-)\n\nWe'll have to investigate how to implement this. It will be fun :-)\n\n> > + *\n> > + * \\return 0 on success or a negative error code on error.\n> > + */\n> > +int Camera::acquire()\n> > +{\n> > +\tif (acquired_)\n> > +\t\treturn -EBUSY;\n> > +\n> > +\tacquired_ = true;\n> > +\treturn 0;\n> > +}\n> > +\n> > +/**\n> > + * \\brief Release exclusive access to the camera device\n> > + *\n> > + * Releasing the camera device allows other users to acquire exclusive access\n> > + * with the acquire() function.\n> > + */\n> > +void Camera::release()\n> > +{\n> > +\tacquired_ = false;\n> > +}\n> > +\n> >  } /* namespace libcamera */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D2CD60DB7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 22:51:31 +0100 (CET)","from pendragon.ideasonboard.com (85-76-73-159-nat.elisa-mobile.fi\n\t[85.76.73.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DC65685;\n\tMon, 28 Jan 2019 22:51:29 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548712291;\n\tbh=pgSSZERVadQ+Ex29B+Hhj38/SNxKPsUMYvq5+TmWmXY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NaDUGNB7uPtLkuuo2N9T5WOOGqGonVTvWQDRzoplV00nMpAu9ZQK3odeHTIeLUMgF\n\tqJrDkPg/Kz5Zp54S7Y1JMOHdeTMExoj90nPm8HSTlK+8ORSsAPAufSbHQoV6gC0QHk\n\tv4P9DWWCrk9jtUj1hDTts/1ZYDB0uYMDdQquegk4=","Date":"Mon, 28 Jan 2019 23:51:26 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190128215126.GB4332@pendragon.ideasonboard.com>","References":"<20190127002208.18913-1-niklas.soderlund@ragnatech.se>\n\t<20190127002208.18913-4-niklas.soderlund@ragnatech.se>\n\t<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Jan 2019 21:51:31 -0000"}},{"id":664,"web_url":"https://patchwork.libcamera.org/comment/664/","msgid":"<20190128221313.GA26790@bigcity.dyn.berto.se>","date":"2019-01-28T22:13:13","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your feedback.\n\nOn 2019-01-28 10:58:04 +0000, Kieran Bingham wrote:\n> Hi All,\n> \n> On 27/01/2019 00:22, Niklas Söderlund wrote:\n> > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Can we have at least a brief excerpt from the brief below here in the\n> commit message so that our git-log is valid and readable independently?\n> \n> How about:\n> \n> Exclusive access must be obtained before performing operations that\n> change the device state. Define an internal flag to track ownership and\n> provide a means of protecting functions that change device configuration.\n\nI agree with you that adding this to the commit messages adds value, \nadded per your suggestion. Thanks!\n\n> \n> \n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  include/libcamera/camera.h |  5 +++++\n> >  src/libcamera/camera.cpp   | 39 +++++++++++++++++++++++++++++++++++++-\n> >  2 files changed, 43 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > index a2ded62de94814c4..7e358f8c0aa093cf 100644\n> > --- a/include/libcamera/camera.h\n> > +++ b/include/libcamera/camera.h\n> > @@ -29,6 +29,9 @@ public:\n> >  \n> >  \tSignal<Camera *> disconnected;\n> >  \n> > +\tint acquire();\n> > +\tvoid release();\n> > +\n> >  private:\n> >  \tCamera(PipelineHandler *pipe, const std::string &name);\n> >  \t~Camera();\n> > @@ -38,6 +41,8 @@ private:\n> >  \n> >  \tstd::shared_ptr<PipelineHandler> pipe_;\n> >  \tstd::string name_;\n> > +\n> > +\tbool acquired_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > index 9cec289282e4797b..500976b237bcbd2d 100644\n> > --- a/src/libcamera/camera.cpp\n> > +++ b/src/libcamera/camera.cpp\n> > @@ -102,12 +102,14 @@ const std::string &Camera::name() const\n> >   */\n> >  \n> >  Camera::Camera(PipelineHandler *pipe, const std::string &name)\n> > -\t: pipe_(pipe->shared_from_this()), name_(name)\n> > +\t: pipe_(pipe->shared_from_this()), name_(name), acquired_(false)\n> >  {\n> >  }\n> >  \n> >  Camera::~Camera()\n> >  {\n> > +\tif (acquired_)\n> > +\t\tLOG(Camera, Error) << \"Removing camera while still in use\";\n> >  }\n> >  \n> >  /**\n> > @@ -127,4 +129,39 @@ void Camera::disconnect()\n> >  \tdisconnected.emit(this);\n> >  }\n> >  \n> > +/**\n> > + * \\brief Acquire the camera device for exclusive access\n> > + *\n> > + * After opening the device with open(), exclusive access must be obtained\n> > + * before performing operations that change the device state. This function is\n> > + * not blocking, if the device has already been acquired (by the same or another\n> > + * process) the -EBUSY error code is returned.\n> > + *\n> > + * Once exclusive access isn't needed anymore, the device should be released\n> > + * with a call to the release() function.\n> > + *\n> > + * \\todo Implement exclusive access across processes.\n> \n> Aha - ok - I was going to say \"but this code doesn't protect the device\"\n> ... and now I see the todo - so I'll let it pass.\n> \n> When we implement this - it would be nice to store some information\n> about the process who has acquired the device so that we can report\n> \"who\" has the device if a request fails.\n> \n> I expect this will be useful when we debug the 'Who has locked the\n> device and not released it' issues ... or if a process hangs with the\n> acquire lock.\n> \n> Ideally we want to make this work in some way that if something kills\n> the process the lock is also released - as it will affect other processes.\n> \n> Perhaps if the 'owner' doesn't exist any more an acquire might succeed.\n> Who knows  :-)\n\nI'm both scared and thrilled to tackle this issue, sometime in the \nfuture. But yes storing the owner who locked it I think is a good idea \nto aid future debugging.\n\nThinking out loud, maybe we can store the pid of the owner inside the \nlock file. Then we can 'check' if a lock is valid by verifying that the \npid is still alive. Well lets cross this bridge once we get there.\n\n> \n> \n> > + *\n> > + * \\return 0 on success or a negative error code on error.\n> > + */\n> > +int Camera::acquire()\n> > +{\n> > +\tif (acquired_)\n> > +\t\treturn -EBUSY;\n> > +\n> > +\tacquired_ = true;\n> > +\treturn 0;\n> > +}\n> > +\n> > +/**\n> > + * \\brief Release exclusive access to the camera device\n> > + *\n> > + * Releasing the camera device allows other users to acquire exclusive access\n> > + * with the acquire() function.\n> > + */\n> > +void Camera::release()\n> > +{\n> > +\tacquired_ = false;\n> > +}\n> > +\n> >  } /* namespace libcamera */\n> > \n> \n> -- \n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x142.google.com (mail-lf1-x142.google.com\n\t[IPv6:2a00:1450:4864:20::142])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1EBD660B1B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 23:13:16 +0100 (CET)","by mail-lf1-x142.google.com with SMTP id f5so13062536lfc.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 14:13:16 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tt144sm3188743lff.53.2019.01.28.14.13.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 28 Jan 2019 14:13:13 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=/41fUkls/34YvagQspbY1MobPqVuBA4b7TYiwMJmkoM=;\n\tb=e7OBB6Fx1VjkElfxCPNX9DilwJQZXMcurzX+YqFuo0iqJtrF0rNRJsG8dyjdagVXgL\n\teHwyC0IGgbU6u6ukeuSjX0j5vQCN5eaaGGnNmjyGr2+zo2hkh+8hBWW9T7HqSdWj2ljq\n\tv4+OiU2cesSPkwiqOczAfI/6D9BmVIZDJPpFqOgfAP0gE3Jg0tduTvdhHff7kymlMR81\n\ts03749NbXNkQ8U65Bqw5jpckTRZ4oyWdbIHohFHeuj9O0vJ8FNTaQ1SK4OxKRLOKdQ99\n\tPaiovX2gkZlbhTlcYjlwiAu1+YaMiNqdPoawUZ3HMkgeyYgpDwjOojf5ZI9hhO60G4Qo\n\tpWNQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=/41fUkls/34YvagQspbY1MobPqVuBA4b7TYiwMJmkoM=;\n\tb=sPoZIq1U/ZLDJX2uuJMmJ0HR/zORMh+lw+6lislpyhvn0NfNztvd1Y9pX50ZcF7Gmh\n\tkyjFg+AyZx/4m6Kan7xr0TzDJC/ERuSN2Y29U/WOVQMUTakDcuo7F9FRHobeaMo1Q7i+\n\tkjVqfDvyDOJ6ksmOHaSgSj7sWEI4bIqf+Mjzc3smRiJGT+2icA3GGreT12STdq1zThMp\n\tMZ+0A0VH/cTHxBNSvcHxB5GvGn8EFuKJHiijpXa11gMpIhSo7esLoQ+olMojNyWkTjz+\n\tA6nD2rKldgGDnxVgKG5lJ7EZG7537Nw/0Yi3Nb+fE2MO2TuAAlJmXNU2xfYvtlt9pSjX\n\tmPaw==","X-Gm-Message-State":"AJcUukeqNZS5E91+Lz/aE/aiHgscp5s9h2c4C7iSoP1R6KsNZTraKRGj\n\t/5BcQbsBGJHpwfczseE8Rz3vKg==","X-Google-Smtp-Source":"ALg8bN4XNb1VgVJJFCdBgQCnkrbd0zF0yH6VfaGwjBBPrI6pPjWabX5rEcD86PB511PpBP3WrwDLtA==","X-Received":"by 2002:a19:41c4:: with SMTP id\n\to187mr17796948lfa.32.1548713595042; \n\tMon, 28 Jan 2019 14:13:15 -0800 (PST)","Date":"Mon, 28 Jan 2019 23:13:13 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190128221313.GA26790@bigcity.dyn.berto.se>","References":"<20190127002208.18913-1-niklas.soderlund@ragnatech.se>\n\t<20190127002208.18913-4-niklas.soderlund@ragnatech.se>\n\t<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Jan 2019 22:13:16 -0000"}},{"id":669,"web_url":"https://patchwork.libcamera.org/comment/669/","msgid":"<20190129013900.GE26790@bigcity.dyn.berto.se>","date":"2019-01-29T01:39:00","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"On 2019-01-28 23:13:13 +0100, Niklas Söderlund wrote:\n> Hi Laurent,\n\ns/Laurent/Kieran/\n\nSorry about that :-)\n\n> \n> Thanks for your feedback.\n> \n> On 2019-01-28 10:58:04 +0000, Kieran Bingham wrote:\n> > Hi All,\n> > \n> > On 27/01/2019 00:22, Niklas Söderlund wrote:\n> > > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > Can we have at least a brief excerpt from the brief below here in the\n> > commit message so that our git-log is valid and readable independently?\n> > \n> > How about:\n> > \n> > Exclusive access must be obtained before performing operations that\n> > change the device state. Define an internal flag to track ownership and\n> > provide a means of protecting functions that change device configuration.\n> \n> I agree with you that adding this to the commit messages adds value, \n> added per your suggestion. Thanks!\n> \n> > \n> > \n> > \n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > > ---\n> > >  include/libcamera/camera.h |  5 +++++\n> > >  src/libcamera/camera.cpp   | 39 +++++++++++++++++++++++++++++++++++++-\n> > >  2 files changed, 43 insertions(+), 1 deletion(-)\n> > > \n> > > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > > index a2ded62de94814c4..7e358f8c0aa093cf 100644\n> > > --- a/include/libcamera/camera.h\n> > > +++ b/include/libcamera/camera.h\n> > > @@ -29,6 +29,9 @@ public:\n> > >  \n> > >  \tSignal<Camera *> disconnected;\n> > >  \n> > > +\tint acquire();\n> > > +\tvoid release();\n> > > +\n> > >  private:\n> > >  \tCamera(PipelineHandler *pipe, const std::string &name);\n> > >  \t~Camera();\n> > > @@ -38,6 +41,8 @@ private:\n> > >  \n> > >  \tstd::shared_ptr<PipelineHandler> pipe_;\n> > >  \tstd::string name_;\n> > > +\n> > > +\tbool acquired_;\n> > >  };\n> > >  \n> > >  } /* namespace libcamera */\n> > > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > > index 9cec289282e4797b..500976b237bcbd2d 100644\n> > > --- a/src/libcamera/camera.cpp\n> > > +++ b/src/libcamera/camera.cpp\n> > > @@ -102,12 +102,14 @@ const std::string &Camera::name() const\n> > >   */\n> > >  \n> > >  Camera::Camera(PipelineHandler *pipe, const std::string &name)\n> > > -\t: pipe_(pipe->shared_from_this()), name_(name)\n> > > +\t: pipe_(pipe->shared_from_this()), name_(name), acquired_(false)\n> > >  {\n> > >  }\n> > >  \n> > >  Camera::~Camera()\n> > >  {\n> > > +\tif (acquired_)\n> > > +\t\tLOG(Camera, Error) << \"Removing camera while still in use\";\n> > >  }\n> > >  \n> > >  /**\n> > > @@ -127,4 +129,39 @@ void Camera::disconnect()\n> > >  \tdisconnected.emit(this);\n> > >  }\n> > >  \n> > > +/**\n> > > + * \\brief Acquire the camera device for exclusive access\n> > > + *\n> > > + * After opening the device with open(), exclusive access must be obtained\n> > > + * before performing operations that change the device state. This function is\n> > > + * not blocking, if the device has already been acquired (by the same or another\n> > > + * process) the -EBUSY error code is returned.\n> > > + *\n> > > + * Once exclusive access isn't needed anymore, the device should be released\n> > > + * with a call to the release() function.\n> > > + *\n> > > + * \\todo Implement exclusive access across processes.\n> > \n> > Aha - ok - I was going to say \"but this code doesn't protect the device\"\n> > ... and now I see the todo - so I'll let it pass.\n> > \n> > When we implement this - it would be nice to store some information\n> > about the process who has acquired the device so that we can report\n> > \"who\" has the device if a request fails.\n> > \n> > I expect this will be useful when we debug the 'Who has locked the\n> > device and not released it' issues ... or if a process hangs with the\n> > acquire lock.\n> > \n> > Ideally we want to make this work in some way that if something kills\n> > the process the lock is also released - as it will affect other processes.\n> > \n> > Perhaps if the 'owner' doesn't exist any more an acquire might succeed.\n> > Who knows  :-)\n> \n> I'm both scared and thrilled to tackle this issue, sometime in the \n> future. But yes storing the owner who locked it I think is a good idea \n> to aid future debugging.\n> \n> Thinking out loud, maybe we can store the pid of the owner inside the \n> lock file. Then we can 'check' if a lock is valid by verifying that the \n> pid is still alive. Well lets cross this bridge once we get there.\n> \n> > \n> > \n> > > + *\n> > > + * \\return 0 on success or a negative error code on error.\n> > > + */\n> > > +int Camera::acquire()\n> > > +{\n> > > +\tif (acquired_)\n> > > +\t\treturn -EBUSY;\n> > > +\n> > > +\tacquired_ = true;\n> > > +\treturn 0;\n> > > +}\n> > > +\n> > > +/**\n> > > + * \\brief Release exclusive access to the camera device\n> > > + *\n> > > + * Releasing the camera device allows other users to acquire exclusive access\n> > > + * with the acquire() function.\n> > > + */\n> > > +void Camera::release()\n> > > +{\n> > > +\tacquired_ = false;\n> > > +}\n> > > +\n> > >  } /* namespace libcamera */\n> > > \n> > \n> > -- \n> > Regards\n> > --\n> > Kieran\n> \n> -- \n> Regards,\n> Niklas Söderlund","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C6D2060C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 02:39:02 +0100 (CET)","by mail-lf1-x141.google.com with SMTP id y11so13391526lfj.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jan 2019 17:39:02 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tk68-v6sm3394069ljb.35.2019.01.28.17.39.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 28 Jan 2019 17:39:01 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=+vAt0D4gy1C412hRJiFjtcucL5mGPV/VwjGA0BGjsd0=;\n\tb=nem3zqyCCP5rSHr+KZPNx4GBelnFEACvOqWBmFxSez9NliIzvKZDlI1Ja1Bs4zlzpJ\n\trb7mKZg1UUdO4a6AApVwfWhVBr/WEM4cI8gXMrWDvC/oZ63Z8uus+okV0IazZ/wVhHT9\n\tU1LwMkk93Lb/J7JPdz/GzQLxdDxBQ8HbAEwWljS5kZCewYcb2fDLp0Y3q+vC0SEDBi7T\n\tZC2CxzaJkWzJc1YynT1IBvNk+dS1oGBVGzQ4byylnma9/Uac4lmlv+qxmWQlHC056WfK\n\t/+JcfbpO3oJcFORBEA6xGmG1ky35pQxZlFiER9keZg0JluXwISCo7is7Y+uMDJ6Grjh7\n\twiHg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=+vAt0D4gy1C412hRJiFjtcucL5mGPV/VwjGA0BGjsd0=;\n\tb=dVMuQzcNPU3w3FzqGQ85slmViWWIV04E2Bmr/D+YCwuEr7AhtGWsDiQU9oEyXfGUM/\n\tWUGJDjcsZwNukuLpus/yaUa/7vLu2CfYrJYzZDiwqGTdCe2fW0EURRMYtxM4ktEQ1mBY\n\tB3yBgIDd0LlxL5H99EfiKJs4yFiSeEUGIkK5EH9VSOvCEOuinlkZi4TBl9n8WmzzKB2l\n\tg+jFfYbYgvyKpesZCWNHx1yzzQjlCael6P+c0WNbAjcVephh2skoYyCUu7xTP0G7Qao0\n\t3b7l1dHcApz2Qb37dXY59Ws7DMJj8uvswrmULMFZO+hTk05SyLnTNYL6d3odbXbjFqys\n\tY7UA==","X-Gm-Message-State":"AJcUukd/P4fMf6Ab0WCQ/NvUIAzze/Ea8tJaCwfMEzGCsqfDCIexfKLs\n\t9g5ITj92KxrJ7w7I4ws/jrcJ8h7LZUE=","X-Google-Smtp-Source":"ALg8bN4PiMNoFo6WLjahWCd8lpeJlY55NKd5JMp2GgfONc/2QkJElILadriJ91tqcCKoDatjYIdCww==","X-Received":"by 2002:a19:a40f:: with SMTP id q15mr18207889lfc.4.1548725941957;\n\tMon, 28 Jan 2019 17:39:01 -0800 (PST)","Date":"Tue, 29 Jan 2019 02:39:00 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190129013900.GE26790@bigcity.dyn.berto.se>","References":"<20190127002208.18913-1-niklas.soderlund@ragnatech.se>\n\t<20190127002208.18913-4-niklas.soderlund@ragnatech.se>\n\t<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>\n\t<20190128221313.GA26790@bigcity.dyn.berto.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190128221313.GA26790@bigcity.dyn.berto.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 29 Jan 2019 01:39:03 -0000"}},{"id":671,"web_url":"https://patchwork.libcamera.org/comment/671/","msgid":"<9b5ec694-ca8e-5df2-1fef-04935c34df12@ideasonboard.com>","date":"2019-01-29T09:15:58","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 29/01/2019 01:39, Niklas Söderlund wrote:\n> On 2019-01-28 23:13:13 +0100, Niklas Söderlund wrote:\n>> Hi Laurent,\n> \n> s/Laurent/Kieran/\n> \n> Sorry about that :-)\n\n\nIt's fine, I'm used to it by now :P\n(I think Laurent did the same between us, and I'm sure I'll manage to do\nthe same sometime hehe)","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0567B60B2D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 10:16:02 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6654585;\n\tTue, 29 Jan 2019 10:16:01 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548753361;\n\tbh=QnABO/WeQmCKFOk/+v0DYNWMQZgslRBLO1HEra2JL/o=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=Qf2PV3PEI06Kv0ZMqzMjK6LujM6DGE2N0Wa+U7IFR0XsarPUPWq8wfbviQxcobGBx\n\tFRUaBNQxwuE+praSmm4XUJmbV+EcZBlIss3W26czTLgXA+ckFwVpr6EciLbkLDn09n\n\tEwO/0l1SvyFILTQFLP7no4x9rQGVKwrK+lrlXUeE=","Reply-To":"kieran.bingham@ideasonboard.com","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20190127002208.18913-1-niklas.soderlund@ragnatech.se>\n\t<20190127002208.18913-4-niklas.soderlund@ragnatech.se>\n\t<cce053f4-1aac-adfd-7fb9-d20b943bd3e1@ideasonboard.com>\n\t<20190128221313.GA26790@bigcity.dyn.berto.se>\n\t<20190129013900.GE26790@bigcity.dyn.berto.se>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K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n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<9b5ec694-ca8e-5df2-1fef-04935c34df12@ideasonboard.com>","Date":"Tue, 29 Jan 2019 09:15:58 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.2.1","MIME-Version":"1.0","In-Reply-To":"<20190129013900.GE26790@bigcity.dyn.berto.se>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera: Add\n\tacquire() and release()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 29 Jan 2019 09:16:02 -0000"}}]