[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / psdk_cust / ipc_3_43_00_00_eng / docs / cdoc / ti / sdo / ipc / transports / TransportShmNotify-src.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><title>module ti.sdo.ipc.transports.TransportShmNotify</title>
3 <meta name="googlebot" content="noindex,nofollow">
4 <link rel="stylesheet" type="text/css" href="../../../../src.css"/>
5 </head>
6 <body>
7 <pre class=src>
8 1 <span class="comment">/*
9 </span> 2 <span class="comment"> * Copyright (c) 2012-2013, Texas Instruments Incorporated
10 </span> 3 <span class="comment"> * All rights reserved.
11 </span> 4 <span class="comment"> *
12 </span> 5 <span class="comment"> * Redistribution and use in source and binary forms, with or without
13 </span> 6 <span class="comment"> * modification, are permitted provided that the following conditions
14 </span> 7 <span class="comment"> * are met:
15 </span> 8 <span class="comment"> *
16 </span> 9 <span class="comment"> * * Redistributions of source code must retain the above copyright
17 </span> 10 <span class="comment"> * notice, this list of conditions and the following disclaimer.
18 </span> 11 <span class="comment"> *
19 </span> 12 <span class="comment"> * * Redistributions in binary form must reproduce the above copyright
20 </span> 13 <span class="comment"> * notice, this list of conditions and the following disclaimer in the
21 </span> 14 <span class="comment"> * documentation and/or other materials provided with the distribution.
22 </span> 15 <span class="comment"> *
23 </span> 16 <span class="comment"> * * Neither the name of Texas Instruments Incorporated nor the names of
24 </span> 17 <span class="comment"> * its contributors may be used to endorse or promote products derived
25 </span> 18 <span class="comment"> * from this software without specific prior written permission.
26 </span> 19 <span class="comment"> *
27 </span> 20 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 </span> 21 <span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29 </span> 22 <span class="comment"> * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30 </span> 23 <span class="comment"> * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
31 </span> 24 <span class="comment"> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 </span> 25 <span class="comment"> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33 </span> 26 <span class="comment"> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34 </span> 27 <span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35 </span> 28 <span class="comment"> * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
36 </span> 29 <span class="comment"> * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
37 </span> 30 <span class="comment"> * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 </span> 31 <span class="comment"> */</span>
39 32 <span class="comment">/*
40 </span> 33 <span class="comment"> * ======== TransportShmNotify.xdc ========
41 </span> 34 <span class="comment"> */</span>
42 35
43 36 <span class="xdoc">/*!
44 </span> 37 <span class="xdoc"> * ======== TransportShmNotify ========
45 </span> 38 <span class="xdoc"> * Transport for MessageQ that acts on shared memory.
46 </span> 39 <span class="xdoc"> *
47 </span> 40 <span class="xdoc"> * TransportShmSingle is a simplified version of {<b>@link</b> TransportShm}. This
48 </span> 41 <span class="xdoc"> * transport uses the Notify module to do all the real work. The 'put'
49 </span> 42 <span class="xdoc"> * function passes the message to the other processor using the 'payload'
50 </span> 43 <span class="xdoc"> * parameter to Notify_sendEvent(). The receive side simply casts this
51 </span> 44 <span class="xdoc"> * payload parameter to a MessageQ_Msg and enqueues it locally.
52 </span> 45 <span class="xdoc"> *
53 </span> 46 <span class="xdoc"> * CAVEATS:
54 </span> 47 <span class="xdoc"> *
55 </span> 48 <span class="xdoc"> * The sender will spin in Notify_sendEvent until the receive side has
56 </span> 49 <span class="xdoc"> * read the previous message. This is Notify-driver specific.
57 </span> 50 <span class="xdoc"> * NotifyDriverShm will spin before sending a new event if the prior event
58 </span> 51 <span class="xdoc"> * hasn't been handled. Some Notify drivers may support a FIFO or queue
59 </span> 52 <span class="xdoc"> * for these events to mitigate this busy-wait affect.
60 </span> 53 <span class="xdoc"> */</span>
61 54 @InstanceFinalize
62 55 @InstanceInitError
63 56
64 57 <span class=key>module</span> TransportShmNotify <span class=key>inherits</span> ti.sdo.ipc.interfaces.IMessageQTransport
65 58 {
66 59 <span class="xdoc">/*!
67 </span> 60 <span class="xdoc"> * ======== notifyEventId ========
68 </span> 61 <span class="xdoc"> * Notify event ID for transport.
69 </span> 62 <span class="xdoc"> */</span>
70 63 <span class=key>config</span> UInt16 notifyEventId = 2;
71 64
72 65 <span class="xdoc">/*!
73 </span> 66 <span class="xdoc"> * <b>@_nodoc</b>
74 </span> 67 <span class="xdoc"> * Determines whether the put() call unconditionally does a Cache_wbInv of
75 </span> 68 <span class="xdoc"> * the message before sending a notification to the remote core.
76 </span> 69 <span class="xdoc"> * The default value of 'true' allows us to skip the additional step of
77 </span> 70 <span class="xdoc"> * checking whether cache is enabled for the message.
78 </span> 71 <span class="xdoc"> *
79 </span> 72 <span class="xdoc"> * This should be set to 'false' when it is optimal to perform this
80 </span> 73 <span class="xdoc"> * check. This may be OPTIMAL when sending a message that is allocated
81 </span> 74 <span class="xdoc"> * from a shared region whose cacheFlag is 'false' and when the write-back
82 </span> 75 <span class="xdoc"> * cache operation is expensive.
83 </span> 76 <span class="xdoc"> */</span>
84 77 <span class=key>config</span> Bool alwaysWriteBackMsg = <span class=key>true</span>;
85 78
86 79 <span class=key>instance</span>:
87 80
88 81 <span class=key>internal</span>:
89 82
90 83 Void notifyFxn(UInt16 procId, UInt16 lineId, UInt32 eventId, UArg arg,
91 84 UInt32 payload);
92 85
93 86 <span class="comment">/* Instance State object */</span>
94 87 <span class=key>struct</span> Instance_State {
95 88 UInt16 remoteProcId; <span class="comment">/* dst proc id */</span>
96 89 UInt16 priority; <span class="comment">/* priority to register */</span>
97 90 };
98 91 }
99 </pre>
100 </body></html>