summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c49f186)
raw | patch | inline | side by side (parent: c49f186)
author | vwan@ti.com <vwan@ti.com> | |
Fri, 24 May 2013 22:37:23 +0000 (15:37 -0700) | ||
committer | Chris Ring <cring@ti.com> | |
Thu, 30 May 2013 18:38:03 +0000 (11:38 -0700) |
This is done to avoid unnecessary duplication of code.
Signed-off-by: VW <vwan@ti.com>
Signed-off-by: VW <vwan@ti.com>
18 files changed:
similarity index 97%
rename from linux/include/_NameServer.h
rename to hlos_common/include/_NameServer.h
index 2b3e154b4176569dd711fa3eb937a2ec176f69b8..0a23ec0792e6d4817cc87e321d5110438cc8c69c 100644 (file)
rename from linux/include/_NameServer.h
rename to hlos_common/include/_NameServer.h
index 2b3e154b4176569dd711fa3eb937a2ec176f69b8..0a23ec0792e6d4817cc87e321d5110438cc8c69c 100644 (file)
/*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
similarity index 97%
rename from qnx/include/_NameServerRemoteRpmsg.h
rename to hlos_common/include/_NameServerRemoteRpmsg.h
index b7abd4b68d1284f4318171d8f7aebce690b6432b..b168bd021c6294322ed39cd00d5fb0ed45243fa8 100644 (file)
rename from qnx/include/_NameServerRemoteRpmsg.h
rename to hlos_common/include/_NameServerRemoteRpmsg.h
index b7abd4b68d1284f4318171d8f7aebce690b6432b..b168bd021c6294322ed39cd00d5fb0ed45243fa8 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/linux/include/_MessageQ.h b/linux/include/_MessageQ.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2008-2012, Texas Instruments Incorporated
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** ============================================================================
- * @file _MessageQ.h
- *
- * @brief Defines MessageQ module.
- * ============================================================================
- */
-
-
-#ifndef MESSAGEQ_H_0xded2
-#define MESSAGEQ_H_0xded2
-
-/* Utilities headers */
-#include <ti/ipc/NameServer.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/*!
- * @def MessageQ_MODULEID
- * @brief Unique module ID.
- */
-#define MessageQ_MODULEID (0xded2)
-
-/*!
- * @def MessageQ_ALLOWGROWTH
- * @brief Allow runtime growth
- */
-#define MessageQ_ALLOWGROWTH NameServer_ALLOWGROWTH
-
-/*! @brief Number of queues */
-#define MessageQ_NUM_PRIORITY_QUEUES 2
-
-/*
- * Used to denote a message that was initialized
- * with the #MessageQ_staticMsgInit function.
- */
-#define MessageQ_STATICMSG 0xFFFF
-
-/*! Version setting */
-#define MessageQ_HEADERVERSION (UInt) 0x2000
-
-/*! Mask to extract Trace setting */
-#define MessageQ_TRACEMASK (UInt) 0x1000
-
-/*! Shift for Trace setting */
-#define MessageQ_TRACESHIFT (UInt) 12
-
-
-/*!
- * @brief Structure defining config parameters for the MessageQ Buf module.
- */
-typedef struct MessageQ_Config_tag {
- Bool traceFlag;
- /*!< Trace flag
- * This flag allows the configuration of the default module trace
- * settings.
- */
- UInt maxRuntimeEntries;
- /*!< Maximum number of MessageQs that can be dynamically created */
- UInt maxNameLen;
- /*!< Maximum length for Message queue names */
-} MessageQ_Config;
-
-/* =============================================================================
- * APIs
- * =============================================================================
- */
-/*!
- * @brief Function to get the default configuration for the MessageQ
- * module.
- *
- * This function can be called by the application to get their
- * configuration parameter to MessageQ_setup filled in by the
- * MessageQ module with the default parameters. If the user does
- * not wish to make any change in the default parameters, this API
- * is not required to be called.
- *
- * @param cfg Pointer to the MessageQ module configuration structure
- * in which the default config is to be returned.
- *
- * @sa MessageQ_setup
- */
-Void MessageQ_getConfig (MessageQ_Config * cfg);
-
-/*!
- * @brief Function to setup the MessageQ module.
- *
- * This function sets up the MessageQ module. This function must
- * be called before any other instance-level APIs can be invoked.
- * Module-level configuration needs to be provided to this
- * function. If the user wishes to change some specific config
- * parameters, then MessageQ_getConfig can be called to get the
- * configuration filled with the default values. After this, only
- * the required configuration values can be changed. If the user
- * does not wish to make any change in the default parameters, the
- * application can simply call MessageQ with NULL parameters.
- * The default parameters would get automatically used.
- *
- * @param cfg Optional MessageQ module configuration. If provided as
- * NULL, default configuration is used.
- *
- * @sa MessageQ_destroy
- * NameServer_create
- * GateSpinlock_create
- * Memory_alloc
- */
-Int MessageQ_setup (const MessageQ_Config * cfg);
-
-/* Function to destroy the MessageQ module. */
-Int MessageQ_destroy (void);
-
-/* Returns the amount of shared memory used by one transport instance.
- *
- * The MessageQ module itself does not use any shared memory but the
- * underlying transport may use some shared memory.
- */
-SizeT MessageQ_sharedMemReq (Ptr sharedAddr);
-
-/* Calls the SetupProxy function to setup the MessageQ transports. */
-Int MessageQ_attach (UInt16 remoteProcId, Ptr sharedAddr);
-
-/* Calls the SetupProxy function to detach the MessageQ transports. */
-Int MessageQ_detach (UInt16 remoteProcId);
-
-NameServer_Handle MessageQ_getNameServerHandle(void);
-
-Void MessageQ_setQueueOwner(MessageQ_Handle handle, Int pid);
-
-Void MessageQ_cleanupOwner(Int pid);
-
-Void MessageQ_msgInit(MessageQ_Msg msg);
-
-#if defined (__cplusplus)
-}
-#endif /* defined (__cplusplus) */
-
-
-#endif /* MESSAGEQ_H_0xded2 */
diff --git a/linux/include/_NameServerRemoteRpmsg.h b/linux/include/_NameServerRemoteRpmsg.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2012, Texas Instruments Incorporated
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define NAMESERVER_REQUEST 0
-#define NAMESERVER_RESPONSE 1
-
-#define NAME_SERVER_RPMSG_ADDR 0
-
-#define MAXNAMEINCHAR 80
-#define NAMEARRAYSZIE (((MAXNAMEINCHAR - 1) / sizeof(Bits32)) + 1)
-
-#define NAMESERVER_GET_TIMEOUT 10 /* Seconds */
-
-#define NAMESERVER_MSG_TOKEN 0x5678abcd
-
-/* message sent to remote procId */
-typedef struct NameServerMsg {
- Bits32 reserved; /* reserved field: must be first! */
- Bits32 value; /* holds value */
- Bits32 request; /* whether its a request/response */
- Bits32 requestStatus; /* status of request */
- /* name of NameServer instance */
- Bits32 instanceName[NAMEARRAYSZIE];
- /* name of NameServer entry */
- Bits32 name[NAMEARRAYSZIE];
-} NameServerMsg;
index 428274c0615e25b032f2a641884fbd2602a0cef5..718c0165ce656899099f0e6d277898813a01a944 100644 (file)
##
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
###############################################################################
# THE LIBRARIES TO BUILD
index 94b13206e25fb0730e0bdfc4cef6c0606a935b5c..2331f1740461a5d77a3d017b4cec99404d347c38 100644 (file)
AMTAR = @AMTAR@
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
index 7850c65b26d71d9e6a137ae2d5d58216f0568c00..08e574de7c5a22800c50774becefbc7f8c11d6d2 100644 (file)
##
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
###############################################################################
# THE PROGRAMS TO BUILD
index 69114fcca56031f43936430af937c75e3ebc8c82..2c8c111f12f60187ecee2fc700661e1aaf96e034 100644 (file)
AMTAR = @AMTAR@
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
index 1c9c52ad59f4021252df648ac2dc226330bd8c24..6238155b0a9a03b313ecd491dd55588ff2c634ac 100644 (file)
##
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -I$(CMEM_INSTALL_DIR)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -I$(CMEM_INSTALL_DIR)/packages \
+ -D_GNU_SOURCE -Wall @AM_CFLAGS@
VPATH = ../../../packages/ti/ipc/tests
###############################################################################
index 14715bb8ce2fd25f4c70f83b1ffe2da019911c3e..9205e08e878b440d02fc02546cbcca0a5dc1dbad 100644 (file)
AMTAR = @AMTAR@
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -I$(CMEM_INSTALL_DIR)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -I$(CMEM_INSTALL_DIR)/packages \
+ -D_GNU_SOURCE -Wall @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
index 2624a36516d66bf16621731190ebf067ca4ce314..53f24249daf449803e72cb97b23cf2e3306a936d 100644 (file)
##
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
###############################################################################
# THE LIBRARIES TO BUILD
index 9d93930b99bfbfc231d8fcd1ec4c8f05be1f3fcd..be1abed38bdfebece19de1083b318a7d6b1d390a 100644 (file)
AMTAR = @AMTAR@
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
+ -I$(top_srcdir)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
diff --git a/qnx/include/_NameServer.h b/qnx/include/_NameServer.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2013, Texas Instruments Incorporated
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/*!
- * @file _NameServer.h
- *
- * @brief HLOS-specific NameServer header
- *
- */
-
-
-#ifndef NameServer_H_0XF414
-#define NameServer_H_0XF414
-
-/* Utilities headers */
-#include <ti/ipc/NameServer.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- * Macros & Defines
- * =============================================================================
- */
-
-/*
- * This must match on BIOS side. This will occupy queueIndex 0 of the MessageQ
- * module queues array, forcing MessageQ indicies to start from 1.
- */
-#define NAME_SERVER_RPMSG_ADDR 0
-
-/* =============================================================================
- * APIs
- * =============================================================================
- */
-/*!
- * @brief Function to setup the nameserver module.
- *
- * @sa NameServer_destroy
- */
-Int NameServer_setup (Void);
-
-/*!
- * @brief Function to destroy the nameserver module.
- *
- * @sa NameServer_setup
- */
-Int NameServer_destroy (void);
-
-#if defined (__cplusplus)
-}
-#endif
-
-#endif
diff --git a/qnx/src/api/common.mk b/qnx/src/api/common.mk
index cbbe9389919a952ea4f49b21cf9187777ced7c51..a89e2032af205e49ae1cd979f0d2376b8d4cb21c 100644 (file)
--- a/qnx/src/api/common.mk
+++ b/qnx/src/api/common.mk
EXTRA_INCVPATH += \
$(IPC_REPO)/packages \
$(IPC_REPO)/qnx/include \
+ $(IPC_REPO)/hlos_common/include \
$(IPC_REPO)/qnx/src/ipc3x_dev
include $(MKFILES_ROOT)/qtargets.mk
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk
index 585c061dd097af5548470bbb9f72da01dde51bcb..2e8daa843ccb5dedc6036185ab4ee0e7c3f7a3cb 100644 (file)
$(SYSLINK_ROOT)/ti/syslink/inc/usr \
$(SYSLINK_ROOT)/ti/syslink/inc/$(SYSLINK_BUILDOS) \
$(IPC_REPO)/packages \
- $(IPC_REPO)/qnx/include
+ $(IPC_REPO)/qnx/include \
+ $(IPC_REPO)/hlos_common/include
#SRCS:=$(CSRCS)
#SRCDIRS=$(sort $(foreach i,$(CSRCS),$(shell dirname $i)))
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk
index 5033377ab0b2179ffc14bc18ef7a58a1813ee9bb..03aee5419a09e99354d0a0503410139722bac727 100644 (file)
$(SYSLINK_ROOT)/tiler/resmgr/tiler/public \
$(SYSLINK_ROOT)/ti/syslink/resources \
$(IPC_REPO)/qnx/include \
+ $(IPC_REPO)/hlos_common/include \
$(IPC_REPO)/packages \
#devctl for ipc, procmgr, utils
index 806b0061cd63b54ac436a7c4810c879a2775b5ad..14d2c23bc94c7552439f5a1bffbc4496f135457a 100644 (file)
# include path
EXTRA_INCVPATH += \
$(IPC_REPO)/packages \
+ $(IPC_REPO)/hlos_common/include \
$(IPC_REPO)/qnx/include
include $(MKFILES_ROOT)/qtargets.mk