mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-10-06 10:59:48 +08:00
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:
committed by
Sebastian Huber
parent
e9d427c097
commit
51dd2cc3ad
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user