TI中文支持网
TI专业的中文技术问题搜集分享网站

TI ROTS 提供的队列API

任务间想使用队列同步数据,两个调用 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无法找到?

赞(0)
未经允许不得转载:TI中文支持网 » TI ROTS 提供的队列API
分享到: 更多 (0)