Bluetooth: Move BT_STACK definitions to log.h
BT_STACK depends on BT_STACK_DEBUG_EXTRA, therefore moving it there. It also allows to use BT_STACK in drivers, at the moment only Bluetooth stack uses it. Change-Id: I41e0e0d49dae6abef2dc3a8d1d109127787d3db0 Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
e28c5cecd0
commit
7160c9c95e
2 changed files with 8 additions and 12 deletions
|
@ -43,12 +43,20 @@
|
|||
#define BT_ASSERT(cond) if (!(cond)) { \
|
||||
BT_ERR("assert: '" #cond "' failed"); \
|
||||
}
|
||||
/* Enabling debug increases stack size requirement considerably */
|
||||
#define BT_STACK_DEBUG_EXTRA 512
|
||||
#else
|
||||
#define BT_DBG(fmt, ...)
|
||||
#define BT_ERR(fmt, ...)
|
||||
#define BT_WARN(fmt, ...)
|
||||
#define BT_INFO(fmt, ...)
|
||||
#define BT_ASSERT(cond)
|
||||
#define BT_STACK_DEBUG_EXTRA 0
|
||||
#endif /* CONFIG_BLUETOOTH_DEBUG */
|
||||
|
||||
#define BT_STACK(name, size) \
|
||||
char __stack name[(size) + BT_STACK_DEBUG_EXTRA]
|
||||
#define BT_STACK_NOINIT(name, size) \
|
||||
char __noinit __stack name[(size) + BT_STACK_DEBUG_EXTRA]
|
||||
|
||||
#endif /* __BT_LOG_H */
|
||||
|
|
|
@ -16,18 +16,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Enabling debug increases stack size requirement considerably */
|
||||
#if defined(CONFIG_BLUETOOTH_DEBUG)
|
||||
#define BT_STACK_DEBUG_EXTRA 512
|
||||
#else
|
||||
#define BT_STACK_DEBUG_EXTRA 0
|
||||
#endif
|
||||
|
||||
#define BT_STACK(name, size) \
|
||||
char __stack name[(size) + BT_STACK_DEBUG_EXTRA]
|
||||
#define BT_STACK_NOINIT(name, size) \
|
||||
char __noinit __stack name[(size) + BT_STACK_DEBUG_EXTRA]
|
||||
|
||||
/* LMP feature helpers */
|
||||
#define lmp_bredr_capable(dev) (!((dev).features[4] & BT_LMP_NO_BREDR))
|
||||
#define lmp_le_capable(dev) ((dev).features[4] & BT_LMP_LE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue