任务间想使用队列同步数据,两个调用 Mailbox_create Queue_create 有什么差异吗?
Viki Shi:
A mailbox is a synchronization object in itself while a queue is not. Tasks can pend/block on a mailbox or post to it thereby access to a mailbox can be synchronized/protected. A queue is just a list of objects, inserting and removing from the queue is non-blocking and is not protected. The atomic operations you read about is there to protect access to the queue. With a mailbox you can use the pend and post in your design to protect accesses from multiple tasks.
user4587069:
回复 Viki Shi:
嗯 谢谢 ,我使用的cc2640例程,提示我ti_sysbios_knl_Mailbox_pend__E无法找到?