Skip to content

Commit c520bae

Browse files
author
Yogesh Pande
committed
Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect().
ns_event_loop_thread_start() is incorrectly used at connect() phase, the initial setup is already done at init() phase and the eventloop thread is correctly initialized. Also, the usage of ns_event_loop_thread_start() API should be behind MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_DISPATCH_FROM_APPLICATION flag as application can decide to use main thread for event loop, which will result in linker error for this API call in case of ARMCC compiler.
1 parent 261f73f commit c520bae

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

features/nanostack/mbed-mesh-api/source/nd_tasklet.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ int8_t nd_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_id)
398398
// -2 memory allocation failure
399399
return tasklet_data_ptr->tasklet;
400400
}
401-
ns_event_loop_thread_start();
402401
} else {
403402
tasklet_data_ptr->tasklet = tasklet_id;
404403
mesh_system_send_connect_event(tasklet_data_ptr->tasklet);

features/nanostack/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,7 @@ int8_t thread_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_i
431431
// -1 handler already used by other tasklet
432432
// -2 memory allocation failure
433433
return thread_tasklet_data_ptr->tasklet;
434-
}
435-
436-
ns_event_loop_thread_start();
434+
}
437435
} else {
438436
thread_tasklet_data_ptr->tasklet = tasklet;
439437
mesh_system_send_connect_event(thread_tasklet_data_ptr->tasklet);

0 commit comments

Comments
 (0)