author | Angela Stegmaier <angelabaker@ti.com> | |
Thu, 29 Sep 2016 20:47:00 +0000 (15:47 -0500) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Mon, 24 Oct 2016 16:27:03 +0000 (11:27 -0500) | ||
commit | 4d63faf5b8a67459833047ab61d78e4711c5aa2a | |
tree | 3c6e98317ef99795b28fb4121759343cff5fc113 | tree | snapshot (tar.xz tar.gz zip) |
parent | 6c2b64342cbd0317527a0924140566b2446488f5 | commit | diff |
Linux/Android: Refactor MessageQ_create to Register Later with NameServer
In the current MessageQ_create implementation, the NameServer
registration is done early, before local creation in the user
library is done. It is therefore possible that a remote core
could open a MessageQ that is still being created and put a
message to that MessageQ. This can result in dropped messages
or in the worst case a crash.
This patch moves the NameServer registration to the end of
the creation sequence so that the MessageQ cannot be opened
before it is fully created.
A new LAD command called MESSAGEQ_ANNOUNCE is added that is specifically
for registering a previously created MessageQ with the NameServer.
Once all creation is completed and the MessageQ is ready to
receive messages, the MessageQ_create api makes the call to LAD
MESSAGEQ_ANNOUNCE to register with the NameServer.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
In the current MessageQ_create implementation, the NameServer
registration is done early, before local creation in the user
library is done. It is therefore possible that a remote core
could open a MessageQ that is still being created and put a
message to that MessageQ. This can result in dropped messages
or in the worst case a crash.
This patch moves the NameServer registration to the end of
the creation sequence so that the MessageQ cannot be opened
before it is fully created.
A new LAD command called MESSAGEQ_ANNOUNCE is added that is specifically
for registering a previously created MessageQ with the NameServer.
Once all creation is completed and the MessageQ is ready to
receive messages, the MessageQ_create api makes the call to LAD
MESSAGEQ_ANNOUNCE to register with the NameServer.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
linux/include/_lad.h | diff | blob | history | |
linux/src/api/MessageQ.c | diff | blob | history | |
linux/src/daemon/MessageQ_daemon.c | diff | blob | history | |
linux/src/daemon/lad.c | diff | blob | history |