#3534 assigned task

Reduce uses of rtems_event_transient_send()

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 7.1
Component: dev Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

The transient event predates the self-contained binary semaphores available now via <rtems/threads.h> and is used as workaround to avoid explicit synchronization objects. There are two issues with the transient event.

  1. It is a per-thread resources and using it for different components makes debugging/development difficult. Issues noticed in one component my be caused by another component.
  1. The diagnostic information (e.g. "task" shell command) is poor.

Replace the transient event with a binary semaphore if possible.

The performance test tmonetoone:

*** BEGIN OF TEST TMONETOONE ***
*** TEST VERSION: 6.0.0.4ac51046e0cd6d22d4c89f6d0bbea2383898d698
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_SMP
*** TEST TOOLS: 10.0.1 20200406 (RTEMS 6, RSB b69f54d51740810dc54a50662f5da4d4ba0ddd18, Newlib ece49e4)
yield
a 25425
b 25424
event
a 14082
b 14082
self-contained binary semaphore
a 12449
b 12449
Classic binary semaphore (FIFO)
a 12525
b 12524
Classic binary semaphore (priority)
a 11649
b 11649

*** END OF TEST TMONETOONE ***

shows that the events performing slightly better than the binary semaphores. However, the yield count is about two times the binary semaphore count.

This raises the question if we have to offer a better synchronization primitive for the request and wait for response type actions. This pattern is quite common in device drivers.

Change History (6)

comment:1 Changed on 10/01/18 at 06:16:36 by Sebastian Huber

Owner: set to Sebastian Huber
Status: newassigned

comment:2 Changed on 10/01/18 at 07:03:10 by Sebastian Huber <sebastian.huber@…>

In fca9132/rtems:

bsp/atsam: Use binary semaphore for SPI

Update #3534.

comment:3 Changed on 10/01/18 at 07:03:25 by Sebastian Huber <sebastian.huber@…>

In 5cb23f4b/rtems:

bsp/atsam: Use binary semaphore for I2C

Remove superfluous sleep before each I2C transfer. Reset I2C module
after transfer timeouts.

Update #3534.

comment:4 Changed on 12/19/19 at 08:07:34 by Sebastian Huber

Milestone: 5.16.1

comment:5 Changed on 07/24/20 at 09:38:42 by Sebastian Huber

Description: modified (diff)

comment:6 Changed on 09/08/22 at 08:08:29 by Sebastian Huber

Milestone: 6.17.1
Note: See TracTickets for help on using tickets.