kernel: Clean up _unpend_thread() API

Almost everywhere this was called, it was immediately followed by
_abort_thread_timeout(), for obvious reasons.  The only exceptions
were in timeout and k_timer expiration (unifying these two would be
another good cleanup), which are peripheral parts of the scheduler and
can plausibly use a more "internal" API.

So make the common case the default, and expose the old behavior as
_unpend_thread_no_timeout().  (Along with identical changes for
_unpend_first_thread) Saves code bytes and simplifies scheduler
surface area for future synchronization work.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-04-02 18:24:58 -07:00 committed by Anas Nashif
commit 22642cf309
16 changed files with 45 additions and 33 deletions

View file

@ -119,7 +119,6 @@ void k_mem_slab_free(struct k_mem_slab *slab, void **mem)
if (pending_thread) {
_set_thread_return_value_with_data(pending_thread, 0, *mem);
_abort_thread_timeout(pending_thread);
_ready_thread(pending_thread);
} else {
**(char ***)mem = slab->free_list;