1 /****************************************************************************
3 (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4 www.systec-electronic.com
6 Project: Project independend shared buffer (linear + circular)
8 Description: Declaration of platform specific part for the
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions
17 1. Redistributions of source code must retain the above copyright
18 notice, this list of conditions and the following disclaimer.
20 2. Redistributions in binary form must reproduce the above copyright
21 notice, this list of conditions and the following disclaimer in the
22 documentation and/or other materials provided with the distribution.
24 3. Neither the name of SYSTEC electronic GmbH nor the names of its
25 contributors may be used to endorse or promote products derived
26 from this software without prior written permission. For written
27 permission, please contact info@systec-electronic.com.
29 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
32 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
34 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
39 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 POSSIBILITY OF SUCH DAMAGE.
44 If a provision of this License is or becomes illegal, invalid or
45 unenforceable in any jurisdiction, that shall not affect:
46 1. the validity or enforceability in that jurisdiction of any other
47 provision of this License; or
48 2. the validity or enforceability in other jurisdictions of that or
49 any other provision of this License.
51 -------------------------------------------------------------------------
53 2006/06/27 -rs: V 1.00 (initial version)
55 ****************************************************************************/
60 //---------------------------------------------------------------------------
62 //---------------------------------------------------------------------------
64 typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p);
65 typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p,
66 unsigned int fTimeOut_p);
68 //---------------------------------------------------------------------------
70 //---------------------------------------------------------------------------
72 tShbError ShbIpcInit(void);
73 tShbError ShbIpcExit(void);
75 tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p,
76 const char *pszBufferID_p,
77 tShbInstance * ppShbInstance_p,
78 unsigned int *pfShbNewCreated_p);
79 tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p);
81 tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p);
82 tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p);
84 tShbError ShbIpcStartSignalingNewData(tShbInstance pShbInstance_p,
86 pfnSignalHandlerNewData_p,
87 tShbPriority ShbPriority_p);
88 tShbError ShbIpcStopSignalingNewData(tShbInstance pShbInstance_p);
89 tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p);
91 tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p,
92 unsigned long ulTimeOut_p,
94 pfnSignalHandlerJobReady_p);
95 tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p);
97 void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p);
99 #endif // #ifndef _SHBIPC_H_