zephyr/tests/drivers
Peter A. Bigot d75495709d drivers: gpio: fix mis-use of slist API in callback processing
The iterator over registered callbacks failed to account for the
possibility that the callback would remove itself from the list.  If
this occurred any remaining callbacks would no longer be reachable from
the node.  Switch to the slist iterator that is safe for self-removal.

Note that the slist API remains unsafe for removal of subsequent nodes.
Even with the corrected code removal of the next callback registration
(cached in tmp) will result in it being called anyway, with the
remaining unremoved registrations not being called.  If the next
callback were removed and re-registered on a different device, the
callbacks would be invoked for the wrong device.

Resolve this by a documentation change describing the conditions under
which a change to callback registration from within a callback are
permitted.  Add a similar note regarding the effect of adding a
callback.  The current event invocation behavior for callbacks added
within an event is explicitly left unspecified, though in the current
slist implementation newly added callbacks will not be invoked until the
next event.

Closes #10186

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-05 12:33:25 -06:00
..
adc/adc_api tests: drivers: adc: Add a test case for invalid requests handling 2019-01-17 16:58:21 -05:00
aio cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
aon_counter/aon_api cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
build_all driver/sensor: lps25hb: align driver to auto-generated dts macros 2019-02-01 04:19:42 -06:00
dma cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
entropy/api cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
gpio/gpio_basic_api drivers: gpio: fix mis-use of slist API in callback processing 2019-02-05 12:33:25 -06:00
hwinfo/api tests: drivers: Add basic tests for hwinfo_get_device_id API 2019-02-03 12:07:20 -05:00
i2c tests: i2c_slave_spi: update to proposed DT compatible naming 2019-01-15 08:29:52 -06:00
i2s tests: Updated all the tests which use k_thread_access_grant. 2019-01-03 12:35:14 -08:00
ipm tests: ipm: disable on qemu_x86_64 [REVERT ME] 2019-01-18 09:50:18 -05:00
pci_enum cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
pinmux/pinmux_basic_api cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
pwm/pwm_api cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
rtc/rtc_basic_api cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
spi/spi_loopback cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
uart tests: uart: Add tests for async UART API. 2019-01-22 18:54:12 +01:00
watchdog/wdt_basic_api tests: watchdog: Update test to support drivers with no callback 2019-02-01 19:16:59 -05:00