Bluetooth: Remove custom stack macros

Now that log processing happens in a separate thread, the
BT_STACK_EXTRA macro is not needed (since there's no significant
overhead), and therefore the BT_STACK macros become unnecessary as
well.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-07-19 15:17:59 +03:00 committed by Carles Cufí
commit 251d99132d
12 changed files with 16 additions and 29 deletions

View file

@ -49,9 +49,6 @@ __printf_like(2, 3) void bt_log(int prio, const char *fmt, ...);
__func__, ##__VA_ARGS__)
#define BT_INFO(fmt, ...) bt_log(BT_LOG_INFO, fmt, ##__VA_ARGS__)
/* Enabling debug increases stack size requirement */
#define BT_STACK_DEBUG_EXTRA 300
#elif defined(CONFIG_BT_DEBUG_LOG)
#if BT_DBG_ENABLED
@ -76,9 +73,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#define BT_INFO(fmt, ...) LOG_INF(fmt, ##__VA_ARGS__)
/* Enabling debug increases stack size requirement considerably */
#define BT_STACK_DEBUG_EXTRA 300
#else
static inline __printf_like(1, 2) void _bt_log_dummy(const char *fmt, ...) {};
@ -91,8 +85,6 @@ static inline __printf_like(1, 2) void _bt_log_dummy(const char *fmt, ...) {};
#define BT_WARN BT_DBG
#define BT_INFO BT_DBG
#define BT_STACK_DEBUG_EXTRA 0
#endif
#define BT_ASSERT(cond) if (!(cond)) { \
@ -100,11 +92,6 @@ static inline __printf_like(1, 2) void _bt_log_dummy(const char *fmt, ...) {};
k_oops(); \
}
#define BT_STACK(name, size) \
K_THREAD_STACK_MEMBER(name, (size) + BT_STACK_DEBUG_EXTRA)
#define BT_STACK_NOINIT(name, size) \
K_THREAD_STACK_DEFINE(name, (size) + BT_STACK_DEBUG_EXTRA)
/* This helper is only available when BT_DEBUG is enabled */
const char *bt_hex(const void *buf, size_t len);