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

Jan Sommer soja-lists at aries.uberspace.de
Fri Dec 11 21:18:41 UTC 2015


bump.

Am Thursday 03 December 2015, 21:56:31 schrieb Jan Sommer:
> 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
> ---
>  c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> index 14a2467..6d9a2cd 100644
> --- a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> +++ b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> @@ -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
>        ) {
> 




More information about the devel mailing list