unified: streamline "timeout add" internal interfaces.

Rename _do_timeout_add to _add_timeout, rename _TIMEOUT_ADD to
_add_thread_timeout to better reflect their functionalities. Have the
latter call the former, remove _do_timeout_add and
_nano_timer_timeout_add.

Change-Id: Ica86bea10d99d72bf78379598a942d277e7002d0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-10-05 16:03:31 -04:00
commit 688973e5ab
6 changed files with 34 additions and 52 deletions

View file

@ -38,25 +38,18 @@ static inline void _timeout_remove_tcs_from_wait_q(struct tcs *tcs)
}
#include <timeout_q.h>
#define _TIMEOUT_ADD(thread, pq, ticks) \
do { \
if ((ticks) != TICKS_UNLIMITED) { \
_timeout_add(thread, pq, ticks); \
} \
} while (0)
#elif defined(CONFIG_NANO_TIMERS)
#include <timeout_q.h>
#define _timeout_tcs_init(tcs) do { } while ((0))
#define _abort_thread_timeout(tcs) do { } while ((0))
#define _TIMEOUT_ADD(thread, pq, ticks) do { } while (0)
#define _add_thread_timeout(thread, pq, ticks) do { } while (0)
#else
#define _timeout_tcs_init(tcs) do { } while ((0))
#define _abort_thread_timeout(tcs) do { } while ((0))
#define _timeout_get_next_expiry() (K_FOREVER)
#define _TIMEOUT_ADD(thread, pq, ticks) do { } while (0)
#define _add_thread_timeout(thread, pq, ticks) do { } while (0)
#endif
#ifdef __cplusplus