Skip to content
Snippets Groups Projects
Commit a14e33df authored by Martine Lenders's avatar Martine Lenders Committed by Martine Lenders
Browse files

gnrc_netreg: use thread_has_msg_queue() for msg queue check

parent 986b9d38
No related branches found
No related tags found
No related merge requests found
...@@ -40,12 +40,11 @@ void gnrc_netreg_init(void) ...@@ -40,12 +40,11 @@ void gnrc_netreg_init(void)
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry) int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
{ {
#if DEVELHELP #if DEVELHELP
# if defined(MODULE_GNRC_NETAPI_MBOX) || defined(MODULE_GNRC_NETAPI_CALLBACKS) # if defined(MODULE_GNRC_NETAPI_MBOX) || defined(MODULE_GNRC_NETAPI_CALLBACKS)
bool has_msg_q = (entry->type != GNRC_NETREG_TYPE_DEFAULT) || bool has_msg_q = (entry->type != GNRC_NETREG_TYPE_DEFAULT) ||
(sched_threads[entry->target.pid]->msg_array != NULL); thread_has_msg_queue(sched_threads[entry->target.pid]);
# else # else
bool has_msg_q = (sched_threads[entry->target.pid]->msg_array != NULL); bool has_msg_q = thread_has_msg_queue(sched_threads[entry->target.pid]);
# endif # endif
/* only threads with a message queue are allowed to register at gnrc */ /* only threads with a message queue are allowed to register at gnrc */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment