zephyr/tests
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
..
application_development
benchmarks tests/benchmarks: Add scheduler microbenchmark 2019-02-01 15:57:21 -05:00
bluetooth Bluetooth: tests: Include building mesh ext. in CI 2019-02-05 15:00:08 +01:00
boards tests: board_shell: add flash support 2019-02-04 17:55:40 -05:00
booting/stub
cmsis_rtos_v1 tests: Increase the stack size by CONFIG_TEST_EXTRA_STACKSIZE. 2019-01-16 06:12:33 -05:00
cmsis_rtos_v2
compliance
coverage tests: coverage: GCOV counter value changed in GCC8. 2019-01-28 08:39:06 -05:00
crypto
drivers drivers: gpio: fix mis-use of slist API in callback processing 2019-02-05 12:33:25 -06:00
include
kernel tests: kernel: interrupt: group IRQ line number selection together 2019-02-04 20:50:59 -05:00
lib tests: lib: mem_alloc: esp32 to skip newlib test 2019-01-25 11:20:42 -05:00
misc tests: misc: Add test suite for util.h with tests for COND_CODE_n 2019-01-24 08:40:01 -05:00
net net: lib: mqtt: Get rid of _sock suffix 2019-02-05 11:05:26 -05:00
posix
shell
subsys doc: change board dts documentation with new URLs 2019-02-05 07:04:40 -05:00
unit lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00
ztest app_shmem: renamespace and document 2019-01-30 15:43:58 -08:00
CMakeLists.txt
Kconfig Gcov: Added Kconfig changes needed by Gcov. 2019-01-16 06:12:33 -05:00