summaryrefslogtreecommitdiff
path: root/samples/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2016-12-14 08:33:50 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2016-12-15 09:58:02 +0200
commit71c7c018192b995b9f03bf9c14b164d78909420b (patch)
tree02ee3ebffd7a00f86321980745ff0eaae82855fd /samples/bluetooth
parent45bc46d42e28a0a74e2cfb68548bcaa49a919a09 (diff)
net: buf: Remove the need for net_buf_pool_init()
In order to keep the initialization process light-weight, remove net_buf_pool_init() and instead perform the initialization of the pool and buffers in a "lazy" manner. This means storing more information in the pool, and removing any 'const' members from net_buf. Since there are no more const members in net_buf the buffer array can be declared with __noinit, which further reduces initialization overhead. Change-Id: Ia126af101c2727c130651b697dcba99d159a1c76 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'samples/bluetooth')
-rw-r--r--samples/bluetooth/hci_uart/src/main.c3
-rw-r--r--samples/bluetooth/hci_usb/src/main.c3
2 files changed, 0 insertions, 6 deletions
diff --git a/samples/bluetooth/hci_uart/src/main.c b/samples/bluetooth/hci_uart/src/main.c
index a9401719a..0cefe50ad 100644
--- a/samples/bluetooth/hci_uart/src/main.c
+++ b/samples/bluetooth/hci_uart/src/main.c
@@ -358,9 +358,6 @@ void main(void)
SYS_LOG_DBG("Start");
- /* Initialize the buffer pools */
- net_buf_pool_init(&cmd_tx_pool);
- net_buf_pool_init(&acl_tx_pool);
/* Initialize the FIFOs */
k_fifo_init(&tx_queue);
k_fifo_init(&rx_queue);
diff --git a/samples/bluetooth/hci_usb/src/main.c b/samples/bluetooth/hci_usb/src/main.c
index b6aca2f21..9135a6123 100644
--- a/samples/bluetooth/hci_usb/src/main.c
+++ b/samples/bluetooth/hci_usb/src/main.c
@@ -691,9 +691,6 @@ void main(void)
{
SYS_LOG_DBG("Start");
- /* Initialize the buffer pools */
- net_buf_pool_init(&tx_pool);
- net_buf_pool_init(&acl_tx_pool);
k_fifo_init(&rx_queue);
bt_enable_raw(&rx_queue);