px4io: add missing lock()/unlock() in ioctl

This commit is contained in:
Beat Küng 2019-10-21 12:06:06 +02:00 committed by Daniel Agar
parent 6535d5123e
commit d5f003eed5
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@
#include <px4_config.h>
#include <px4_tasks.h>
#include <px4_sem.hpp>
#include <sys/types.h>
#include <stdint.h>
@ -2333,6 +2334,7 @@ PX4IO::print_status(bool extended_status)
int
PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
{
SmartLock lock_guard(_lock);
int ret = OK;
/* regular ioctl? */