mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
px4io: add missing lock()/unlock() in ioctl
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#include <px4_config.h>
|
#include <px4_config.h>
|
||||||
#include <px4_tasks.h>
|
#include <px4_tasks.h>
|
||||||
|
#include <px4_sem.hpp>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -2333,6 +2334,7 @@ PX4IO::print_status(bool extended_status)
|
|||||||
int
|
int
|
||||||
PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
|
SmartLock lock_guard(_lock);
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
|
||||||
/* regular ioctl? */
|
/* regular ioctl? */
|
||||||
|
|||||||
Reference in New Issue
Block a user