Store task_id of the current thread for the ISR before waiting for the transient event

The ISR will send a transient event to the task specified in bus->taskid.
Make sure that the correct task_id is written to this field before waiting
for the transient event to arrive.

Fixes #2483
This commit is contained in:
Jan Sommer
2015-12-03 21:56:31 +01:00
committed by Gedare Bloom
parent c8a8a6013f
commit 687463d7f3

View File

@@ -92,6 +92,7 @@ static int rpi_i2c_bus_transfer(rpi_i2c_bus *bus)
/* Sleep until the TX FIFO has free space for a new write. */
if (
bus->task_id = rtems_task_self();
rtems_event_transient_receive(RTEMS_WAIT, bus->base.timeout) !=
RTEMS_SUCCESSFUL
) {