gnrc_netreg: use thread_has_msg_queue() for msg queue check
This commit is contained in:
parent
986b9d380b
commit
a14e33df01
@ -40,12 +40,11 @@ void gnrc_netreg_init(void)
|
||||
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
|
||||
{
|
||||
#if DEVELHELP
|
||||
|
||||
# if defined(MODULE_GNRC_NETAPI_MBOX) || defined(MODULE_GNRC_NETAPI_CALLBACKS)
|
||||
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
|
||||
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
|
||||
|
||||
/* only threads with a message queue are allowed to register at gnrc */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user