dev/io/iodev.c: Fix lock held while waiting on event

iodev lock is now released when waiting on an event. This
allows other IOCTL calls to be made while a thread is waiting
on an event.
This commit is contained in:
Aaron Nyholm
2026-09-28 02:02:56 +00:00
committed by Sebastian Huber
parent e9d427c097
commit 51dd2cc3ad
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -273,7 +273,9 @@ static int rtems_iodev_event_wait_on( struct rtems_iodev *iodev, void *arg )
rtems_set_errno_and_return_minus_one( ENODEV );
}
rtems_iodev_release( iodev );
status = ( *iodev->event_wait )( iodev, e_args );
rtems_iodev_obtain( iodev );
return status;
}
+3 -1
View File
@@ -226,7 +226,9 @@ struct rtems_iodev {
);
/**
* @brief Call to the device driver to wait on event.
* @brief Call to the device driver to wait on event. The iodev lock is not
* held when event_wait is called to allow other IOCTL calls while waiting
* on an event.
*
* @param[in] iodev Pointer to iodev device.
* @param[in,out] event_args Arguments for wait operation.