打印

IPC 新手求助 MessageQ初始化配置相关问题

[复制链接]
1675|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
heitubaishui|  楼主 | 2014-9-24 20:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
想在一个核内创建多个MessageQ,然后其他核通过不同的MessageQ与该核的不同任务进行信息交互。例如核0内有tsk00使用msgq00,tsk01使用msgq01,核1有tsk10使用msgq10,tsk11使用msgq11。tsk00与tsk10交互,tsk10与tsk11交互,tsk11再与tsk01交互。看ti的IPCUserGuide中提到每串键一个MessagQ时需要指定一个同步机制(The creator of the message queue must also create an object of the desired ISync implementation and assign that object as the "synchronizer" of the MessageQ)。
其中文档中提到了有多种同步机制,如下:
The following are ISync implementations provided by XDCtools and
SYS/BIOS:
❏ xdc.runtime.knl.SyncNull. The signal() and wait() functions do
nothing. Basically this implementation allows for polling.
❏ xdc.runtime.knl.SyncSemThread.  An implementation built using
the xdc.runtime.knl.Semaphore module, which is a binary
semaphore.
❏ xdc.runtime.knl.SyncGeneric.xdc. This implementation allows you
to use custom signal() and wait() functions as needed.
❏ ti.sysbios.syncs.SyncSem.  An implementation built using the
ti.sysbios.ipc.Semaphore module. The signal() function runs a
Semaphore_post(). The wait() function runs a Semaphore_pend().
❏ ti.sysbios.syncs.SyncSwi.  An implementation built using the
ti.sysbios.knl.Swi module. The signal() function runs a Swi_post().
The wait() function does nothing and returns FALSE if the timeout
elapses.
❏ ti.sysbios.syncs.SyncEvent.  An implementation built using the
ti.sysbios.ipc.Event module. The signal() function runs an
Event_post(). The wait() function does nothing and returns FALSE if
the timeout elapses. This implementation allows waiting on multiple
events。
请问这些不同配置主要是怎样操作的?比如xdc.runtime.knl.SyncGeneric.xdc,ti.sysbios.syncs.SyncSem,ti.sysbios.syncs.SyncEvent这几个应该如何配置MessagQ的参数,配置后又应该如何使用配置好的MessageQ?
去哪里可以找到这方面相应的参考资料或者历程?现在手里只有一个UserGuide和一个4个核串联MessageQ通信的例程,但这个程序中没有关于同步的配置。还请各位指点一二。谢谢了。

相关帖子

沙发
zhangmangui| | 2014-9-24 22:08 | 只看该作者
不懂   顶一下

使用特权

评论回复
板凳
smilingangel| | 2014-9-25 12:56 | 只看该作者
帮着顶一下的吧

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

2

帖子

0

粉丝