From 63a8f3b824942f34f25e1828904851a7ed7c11a1 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 11 Nov 2016 11:00:45 +0200 Subject: [PATCH] Bluetooth: tests/tester: Convert left-overs to unified kernel APIs Convert fiber_start to k_thread_spawn and nano_fiber_fifo_put to k_fifo_put. Change-Id: If1ec405ec602e28a538f4c9569ede87519346559 Signed-off-by: Johan Hedberg --- tests/bluetooth/tester/src/bttester.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/bluetooth/tester/src/bttester.c b/tests/bluetooth/tester/src/bttester.c index ffad1c8f73c..d496d4cd968 100644 --- a/tests/bluetooth/tester/src/bttester.c +++ b/tests/bluetooth/tester/src/bttester.c @@ -126,7 +126,7 @@ static void handle_core(uint8_t opcode, uint8_t index, uint8_t *data, } } -static void cmd_handler(int arg1, int arg2) +static void cmd_handler(void *p1, void *p2, void *p3) { while (1) { struct btp_hdr *cmd; @@ -164,7 +164,7 @@ static void cmd_handler(int arg1, int arg2) break; } - nano_fiber_fifo_put(&avail_queue, cmd); + k_fifo_put(&avail_queue, cmd); } } @@ -213,7 +213,8 @@ void tester_init(void) k_fifo_put(&avail_queue, &cmd_buf[i * BTP_MTU]); } - task_fiber_start(stack, STACKSIZE, cmd_handler, 0, 0, 7, 0); + k_thread_spawn(stack, STACKSIZE, cmd_handler, NULL, NULL, NULL, + K_PRIO_COOP(7), 0, K_NO_WAIT); uart_pipe_register(k_fifo_get(&avail_queue, K_NO_WAIT), BTP_MTU, recv_cb);