【发布时间】:2017-04-13 17:50:16
【问题描述】:
我正在使用 Rime,更具体地说是使用 runicast 示例。收到消息后,我将其存储在链表中,然后我将事件发布到负责从链表中提取消息并处理它们的进程。我的代码是这样的:
static void recv_runicast(struct runicast_conn *c,
const linkaddr_t *from, uint8_t seqno)
{
/*code to insert the message into the linked list*/
...
/*Post an event to the process which extracts messages from the linked list */
process_post(&extract_msg_from_linked_list, PROCESS_EVENT_CONTINUE, NULL);
}
我的问题是:在回调函数 recv_runicast 中使用 process_post 是否安全?还是我应该使用 process_poll?
提前致谢
【问题讨论】:
标签: contiki