]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - qnx/src/ipc3x_dev/ti/syslink/inc/_MultiProc.h
Moved files from the ipc3x_dev branch in syslink_qnx repository into direct
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / inc / _MultiProc.h
1 /**
2  *  @file   _MultiProc.h
3  *
4  *  @brief      header file for_MultiProc on HLOS side
5  *
6  *
7  *  @ver        02.00.00.46_alpha1
8  *
9  *  ============================================================================
10  *
11  *  Copyright (c) 2008-2009, Texas Instruments Incorporated
12  *
13  *  Redistribution and use in source and binary forms, with or without
14  *  modification, are permitted provided that the following conditions
15  *  are met:
16  *
17  *  *  Redistributions of source code must retain the above copyright
18  *     notice, this list of conditions and the following disclaimer.
19  *
20  *  *  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.
23  *
24  *  *  Neither the name of Texas Instruments Incorporated nor the names of
25  *     its contributors may be used to endorse or promote products derived
26  *     from this software without specific prior written permission.
27  *
28  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
32  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *  Contact information for paper mail:
40  *  Texas Instruments
41  *  Post Office Box 655303
42  *  Dallas, Texas 75265
43  *  Contact information:
44  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
45  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
46  *  ============================================================================
47  *
48  */
51 #ifndef _MULTIPROC_H_0XB522
52 #define _MULTIPROC_H_0XB522
55 #if defined (__cplusplus)
56 extern "C" {
57 #endif
60 /* =============================================================================
61  *  Macros and types
62  * =============================================================================
63  */
64 /*!
65  *  @def    MULTIPROC_MODULEID
66  *  @brief  Unique module ID.
67  */
68 #define MultiProc_MODULEID      (UInt16) 0xB522
70 /*!
71  *  @brief  Max name length for a processor name.
72  */
73 #define MultiProc_MAXNAMELENGTH 32
75 /*!
76  *  @brief  Max number of processors supported.
77  */
78 #define MultiProc_MAXPROCESSORS 10
81 /*!
82  *  @brief  Configuration structure for MultiProc module
83  */
84 typedef struct MultiProc_Config_tag {
85     Int32  numProcessors;
86     /*!< Max number of procs for particular system */
87     Char   nameList [MultiProc_MAXPROCESSORS][MultiProc_MAXNAMELENGTH];
88     /*!< Name List for processors in the system */
89     UInt16 id;
90     /*!< Local Proc ID. This needs to be set before calling any other APIs */
91 } MultiProc_Config;
94 /* =============================================================================
95  *  APIs
96  * =============================================================================
97  */
98 /*!
99  *  @brief      Get the default configuration for the MultiProc module.
100  *
101  *              This function can be called by the application to get their
102  *              configuration parameter to MultiProc_setup filled in by the
103  *              MultiProc module with the default parameters.
104  *
105  *  @param      cfg        Pointer to the MultiProc module configuration
106  *                         structure in which the default config is to be
107  *                         returned.
108  *
109  *  @sa         MultiProc_setup
110  */
111 Void MultiProc_getConfig (MultiProc_Config * cfg);
113 /*!
114  *  @brief      Setup the MultiProc module.
115  *
116  *              This function sets up the MultiProc module. This function
117  *              must be called before any other instance-level APIs can be
118  *              invoked.
119  *              Module-level configuration needs to be provided to this
120  *              function. If the user wishes to change some specific config
121  *              parameters, then MultiProc_getConfig can be called to get the
122  *              configuration filled with the default values. After this, only
123  *              the required configuration values can be changed.
124  *
125  *  @param      cfg   MultiProc module configuration.
126  *
127  *  @sa         MultiProc_destroy
128  */
129 Int MultiProc_setup (MultiProc_Config * cfg);
131 /*!
132  *  @brief      Destroy the MultiProc module.
133  *
134  *              Once this function is called, other MultiProc module APIs,
135  *              except for the MultiProc_getConfig API cannot be called
136  *              anymore.
137  *
138  *  @sa         MultiProc_setup
139  */
140 Int MultiProc_destroy (Void);
142 /*
143  *  @brief     Determines the offset for any two processors.
144  *
145  *  @param     remoteProcId   Remote processor ID
146  */
147 UInt MultiProc_getSlot (UInt16 remoteProcId);
150 #if defined (__cplusplus)
152 #endif /* defined (__cplusplus) */
154 #endif /* if !defined(_MULTIPROC_H_0XB522) */