zephyr/doc/kernel
Andy Ross 3f55dafebc kernel: Deprecate k_thread_cancel() API
The only difference between this call and k_thread_abort() (beyond
some minor performance deltas) is that "cancel" will act as a noop in
cases where the thread has begun execution and will return an error.
"Abort" always succeeds, of course.  That is inherently racy when used
as a "stop the thread" API: there's no way in general (or at all in
SMP situations) to know that you're calling this function "early
enough" to catch the thread before it starts.

Effectively, all k_thread_cancel() gives you that k_thread_abort()
doesn't is an indication about whether or not a thread has started.
There are many other ways to get that information that don't require
dangerous kernel APIs.

Deprecate this function.  Zephyr's own code never used it except for
its own unit test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-04-24 03:57:20 +05:30
..
data_passing doc: kernel: capitalize Fifo/Lifo 2018-03-20 14:01:30 -04:00
memory
other
overview
synchronization doc: Fix K_ALERT_DEFINE in a code example 2018-03-09 20:27:43 -05:00
threads kernel: Deprecate k_thread_cancel() API 2018-04-24 03:57:20 +05:30
timing
usermode doc: fix misspellings in docs 2018-02-22 15:28:20 -05:00
kernel.rst