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 cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
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 cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
cmsis_rtos_v1 tests: Increase the stack size by CONFIG_TEST_EXTRA_STACKSIZE. 2019-01-16 06:12:33 -05:00
cmsis_rtos_v2 tests: cmsis: Disable two cmsis portability tests on x86_64 2019-01-11 15:18:52 -05:00
compliance
coverage tests: coverage: GCOV counter value changed in GCC8. 2019-01-28 08:39:06 -05:00
crypto cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
drivers drivers: gpio: fix mis-use of slist API in callback processing 2019-02-05 12:33:25 -06:00
include arch/x86_64: New architecture added 2019-01-11 15:18:52 -05:00
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 tests/posix/common: Correct TEST_EXTRA_STACKSIZE usage 2019-01-11 15:18:52 -05:00
shell cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
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 tests: coverage: Add Gcov support. 2019-01-16 06:12:33 -05:00
Kconfig Gcov: Added Kconfig changes needed by Gcov. 2019-01-16 06:12:33 -05:00