lib: add post condition assertions for current thread error after user functions
It is a logic error and a post condition breach for a user function to
return a non-error status code (>= 0) but leave an error set on the
current thread. Add some assertions after each point where we call a
user function to catch this kind of mistake.
The macro BT_ASSERT_POST_DEV_NO_ERROR_IF_NO_ERROR_STATUS is meant to be
used in the very fast path (consume/next callbacks). The macro
BT_ASSERT_POST_NO_ERROR_IF_NO_ERROR_STATUS is used elsewhere.
The macros are written in such a way that if they cause an abort, the
error will still be present in thread_error, so accessible to a
debugger.
Change-Id: I4c6127c0b0258dac5be1e3bae63c2d9e6baa2d1f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.033381 seconds and 4 git commands to generate.