author | Robert Tivy <rtivy@ti.com> | |
Fri, 27 Feb 2015 19:21:00 +0000 (11:21 -0800) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Fri, 27 Feb 2015 19:21:00 +0000 (11:21 -0800) |
339 files changed:
diff --git a/.gitignore b/.gitignore
index 89703178c2ae994cfd6b132ebcb66cd4c3362ffb..4b9da0fa95211d390f585284aca8d1a08d26fddf 100644 (file)
--- a/.gitignore
+++ b/.gitignore
/linux/src/tests/MessageQApp
/linux/src/tests/MessageQBench
/linux/src/tests/MessageQMulti
+/linux/src/tests/MessageQMultiMulti
/linux/src/tests/Msgq100
/linux/src/tests/NameServerApp
/linux/src/tests/nano_test_*
diff --git a/Makefile.am b/Makefile.am
index eeb5d108a61ee1fa7827ff1a3ddcd4c08c5357e3..a025329d53b5e6bd6bf83b572772a8e8e5cec811 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
##
-## Copyright (c) 2013-2014, Texas Instruments Incorporated
+## Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
##
# the subdirectories of the project to go into
-SUBDIRS = linux/etc linux/src/utils linux/src/api \
+SUBDIRS = linux/etc linux/src/utils linux/src/api linux/src/transport \
linux/src/mm linux/src/daemon linux/src/tests
# where to install common headers on the system
ipcincludedir = $(includedir)/ti/ipc
+ipcincludeinterfacesdir = $(includedir)/ti/ipc/interfaces
# the list of common header files (to be installed later)
-ipcinclude_HEADERS = $(top_srcdir)/packages/ti/ipc/Ipc.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h \
- $(top_srcdir)/packages/ti/ipc/MessageQ.h \
- $(top_srcdir)/packages/ti/ipc/MultiProc.h \
- $(top_srcdir)/packages/ti/ipc/NameServer.h
+ipcinclude_HEADERS = \
+ $(top_srcdir)/linux/include/ti/ipc/Std.h \
+ $(top_srcdir)/packages/ti/ipc/Ipc.h \
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ $(top_srcdir)/packages/ti/ipc/MessageQ.h \
+ $(top_srcdir)/packages/ti/ipc/MultiProc.h \
+ $(top_srcdir)/packages/ti/ipc/NameServer.h
+
+ipcincludeinterfaces_HEADERS = \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/IMessageQTransport.h \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/INetworkTransport.h \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/ITransport.h
diff --git a/Makefile.in b/Makefile.in
index 8f8b4c6d46813c8d4912239b892e27ff2d23b08c..30df76d1fc2b28e22d5d37bad140b2fb09b79374 100644 (file)
--- a/Makefile.in
+++ b/Makefile.in
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(ipcinclude_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/configure linux/build-aux/config.guess \
- linux/build-aux/config.sub linux/build-aux/depcomp \
- linux/build-aux/install-sh linux/build-aux/ltmain.sh \
- linux/build-aux/missing
+ $(ipcincludeinterfaces_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/configure \
+ linux/build-aux/config.guess linux/build-aux/config.sub \
+ linux/build-aux/depcomp linux/build-aux/install-sh \
+ linux/build-aux/ltmain.sh linux/build-aux/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(ipcincludedir)"
+am__installdirs = "$(DESTDIR)$(ipcincludedir)" \
+ "$(DESTDIR)$(ipcincludeinterfacesdir)"
ipcincludeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(ipcinclude_HEADERS)
+ipcincludeinterfacesHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(ipcinclude_HEADERS) $(ipcincludeinterfaces_HEADERS)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
target_alias = @target_alias@
# the subdirectories of the project to go into
-SUBDIRS = linux/etc linux/src/utils linux/src/api \
+SUBDIRS = linux/etc linux/src/utils linux/src/api linux/src/transport \
linux/src/mm linux/src/daemon linux/src/tests
# where to install common headers on the system
ipcincludedir = $(includedir)/ti/ipc
+ipcincludeinterfacesdir = $(includedir)/ti/ipc/interfaces
# the list of common header files (to be installed later)
-ipcinclude_HEADERS = $(top_srcdir)/packages/ti/ipc/Ipc.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h \
- $(top_srcdir)/packages/ti/ipc/MessageQ.h \
- $(top_srcdir)/packages/ti/ipc/MultiProc.h \
- $(top_srcdir)/packages/ti/ipc/NameServer.h
+ipcinclude_HEADERS = \
+ $(top_srcdir)/linux/include/ti/ipc/Std.h \
+ $(top_srcdir)/packages/ti/ipc/Ipc.h \
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ $(top_srcdir)/packages/ti/ipc/MessageQ.h \
+ $(top_srcdir)/packages/ti/ipc/MultiProc.h \
+ $(top_srcdir)/packages/ti/ipc/NameServer.h
+
+ipcincludeinterfaces_HEADERS = \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/IMessageQTransport.h \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/INetworkTransport.h \
+ $(top_srcdir)/linux/include/ti/ipc/interfaces/ITransport.h
all: all-recursive
echo " rm -f '$(DESTDIR)$(ipcincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(ipcincludedir)/$$f"; \
done
+install-ipcincludeinterfacesHEADERS: $(ipcincludeinterfaces_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(ipcincludeinterfacesdir)" || $(mkdir_p) "$(DESTDIR)$(ipcincludeinterfacesdir)"
+ @list='$(ipcincludeinterfaces_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(ipcincludeinterfacesHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(ipcincludeinterfacesdir)/$$f'"; \
+ $(ipcincludeinterfacesHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(ipcincludeinterfacesdir)/$$f"; \
+ done
+
+uninstall-ipcincludeinterfacesHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(ipcincludeinterfaces_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(ipcincludeinterfacesdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(ipcincludeinterfacesdir)/$$f"; \
+ done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
- $(mkdir_p) $(distdir)/linux/build-aux $(distdir)/linux/src/api $(distdir)/linux/src/mm $(distdir)/linux/src/utils $(distdir)/packages/ti/ipc
+ $(mkdir_p) $(distdir)/linux/build-aux $(distdir)/linux/include/ti/ipc $(distdir)/linux/include/ti/ipc/interfaces $(distdir)/linux/src/api $(distdir)/linux/src/mm $(distdir)/linux/src/utils $(distdir)/packages/ti/ipc
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
all-am: Makefile $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(ipcincludedir)"; do \
+ for dir in "$(DESTDIR)$(ipcincludedir)" "$(DESTDIR)$(ipcincludeinterfacesdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
info-am:
-install-data-am: install-ipcincludeHEADERS
+install-data-am: install-ipcincludeHEADERS \
+ install-ipcincludeinterfacesHEADERS
install-exec-am:
ps-am:
-uninstall-am: uninstall-info-am uninstall-ipcincludeHEADERS
+uninstall-am: uninstall-info-am uninstall-ipcincludeHEADERS \
+ uninstall-ipcincludeinterfacesHEADERS
uninstall-info: uninstall-info-recursive
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-ipcincludeHEADERS \
- install-man install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am \
- uninstall-ipcincludeHEADERS
+ install-ipcincludeinterfacesHEADERS install-man install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am uninstall-info-am \
+ uninstall-ipcincludeHEADERS \
+ uninstall-ipcincludeinterfacesHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
index 0374812e8206c4cf17f34e7ed3afa01dc5c44017..e90c5913654020da82f64e11d74af346a5c4f7be 100644 (file)
#
-# Copyright (c) 2013-2014, Texas Instruments Incorporated
+# Copyright (c) 2013-2015, Texas Instruments Incorporated
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
$(IPC_ROOT)/linux/src/daemon/MessageQ_daemon.c \
$(IPC_ROOT)/linux/src/daemon/MultiProc_daemon.c \
$(IPC_ROOT)/linux/src/daemon/NameServer_daemon.c \
- $(IPC_ROOT)/linux/src/daemon/MultiProcCfg_dra7xx.c \
+ $(IPC_ROOT)/linux/src/daemon/cfg/MultiProcCfg_dra7xx.c \
$(IPC_ROOT)/linux/src/daemon/GateMP_daemon.c \
$(IPC_ROOT)/linux/src/daemon/GateHWSpinlock.c \
$(IPC_ROOT)/linux/src/daemon/GateHWSpinlock_daemon.c \
- $(IPC_ROOT)/linux/src/daemon/GateHWSpinlockCfg_dra7xx.c \
+ $(IPC_ROOT)/linux/src/daemon/cfg/GateHWSpinlockCfg_dra7xx.c \
+ $(IPC_ROOT)/linux/src/daemon/cfg/MessageQCfg.c \
$(IPC_ROOT)/linux/src/api/gates/GateMutex.c
LOCAL_SHARED_LIBRARIES := \
index c06eb0ce0d974805226286678cf9a55a386c682c..9fb8660f6f402ee2fab7ce91aada5d958e001855 100644 (file)
#
-# Copyright (c) 2013, Texas Instruments Incorporated
+# Copyright (c) 2013-2015, Texas Instruments Incorporated
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
LOCAL_SRC_FILES:= $(IPC_ROOT)/linux/src/tests/MessageQApp.c
LOCAL_SHARED_LIBRARIES := \
- liblog libtiipcutils libtiipc
+ liblog libtiipcutils libtiipc libtitransportrpmsg
LOCAL_MODULE:= messageQApp
include $(BUILD_EXECUTABLE)
LOCAL_SRC_FILES:= $(IPC_ROOT)/linux/src/tests/MessageQBench.c
LOCAL_SHARED_LIBRARIES := \
- liblog libtiipcutils libtiipc
+ liblog libtiipcutils libtiipc libtitransportrpmsg
LOCAL_MODULE:= messageQBench
include $(BUILD_EXECUTABLE)
LOCAL_SRC_FILES:= $(IPC_ROOT)/linux/src/tests/MessageQMulti.c
LOCAL_SHARED_LIBRARIES := \
- liblog libtiipcutils libtiipc
+ liblog libtiipcutils libtiipc libtitransportrpmsg
LOCAL_MODULE:= messageQMulti
include $(BUILD_EXECUTABLE)
LOCAL_SRC_FILES:= $(IPC_ROOT)/linux/src/tests/NameServerApp.c
LOCAL_SHARED_LIBRARIES := \
- liblog libtiipcutils libtiipc
+ liblog libtiipcutils libtiipc libtitransportrpmsg
LOCAL_MODULE:= nameServerApp
include $(BUILD_EXECUTABLE)
diff --git a/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_SYM/Makefile.inc b/android/src/transport/Android.mk
similarity index 68%
rename from qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_SYM/Makefile.inc
rename to android/src/transport/Android.mk
index b712307abc609235bc07fc6a5ce1ae0f15ebf732..4c6965d609e7dcde8501ad6c9925069233401775 100644 (file)
rename from qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/DLOAD_SYM/Makefile.inc
rename to android/src/transport/Android.mk
index b712307abc609235bc07fc6a5ce1ae0f15ebf732..4c6965d609e7dcde8501ad6c9925069233401775 100644 (file)
-# ============================================================================
-# @file Makefile.inc
#
-# @brief Makefile definitions
-#
-#
-# @ver 02.00.00.19
-#
-# ============================================================================
-#
-# Copyright (c) 2008-2009, Texas Instruments Incorporated
-# All rights reserved.
+# Copyright (c) 2015, Texas Instruments Incorporated
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# 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.
-# Contact information for paper mail:
-# Texas Instruments
-# Post Office Box 655303
-# Dallas, Texas 75265
-# Contact information:
-# http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
-# DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
-# ============================================================================
-
-OBJECTS := symtab.o
+#
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+IPC_ROOT := ../../..
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(IPC_ROOT)/linux/include \
+ $(LOCAL_PATH)/$(IPC_ROOT)/packages \
+ $(LOCAL_PATH)/$(IPC_ROOT)/hlos_common/include
+
+LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
+LOCAL_MODULE_TAGS:= optional
+
+LOCAL_SRC_FILES:= $(IPC_ROOT)/linux/src/transport/TransportRpmsg.c
+
+LOCAL_SHARED_LIBRARIES := \
+ liblog libtiipcutils libtiipc
+
+LOCAL_MODULE:= libtitransportrpmsg
+include $(BUILD_SHARED_LIBRARY)
diff --git a/configure b/configure
index a2d57cc0abfe608cfe253bd7f4eee2f3f765f385..0249c7e3345fea4acc1a54dec684f1e9a5c0d88e 100755 (executable)
--- a/configure
+++ b/configure
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LIBTOOL AM_CFLAGS AM_LDFLAGS PLATFORM CMEM_INSTALL_DIR KERNEL_INSTALL_DIR DRM_PREFIX OMAPL138_TRUE OMAPL138_FALSE C66AK2E_TRUE C66AK2E_FALSE TCI6614_TRUE TCI6614_FALSE TCI6630_TRUE TCI6630_FALSE TCI6636_TRUE TCI6636_FALSE TCI6638_TRUE TCI6638_FALSE OMAP54XX_SMP_TRUE OMAP54XX_SMP_FALSE DRA7XX_TRUE DRA7XX_FALSE CMEM_TRUE CMEM_FALSE KDIR_TRUE KDIR_FALSE DRM_TRUE DRM_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LIBTOOL AM_CFLAGS AM_LDFLAGS PLATFORM CMEM_INSTALL_DIR KERNEL_INSTALL_DIR AF_RPMSG DRM_PREFIX OMAPL138_TRUE OMAPL138_FALSE C66AK2E_TRUE C66AK2E_FALSE TCI6614_TRUE TCI6614_FALSE TCI6630_TRUE TCI6630_FALSE TCI6636_TRUE TCI6636_FALSE TCI6638_TRUE TCI6638_FALSE OMAP54XX_SMP_TRUE OMAP54XX_SMP_FALSE DRA7XX_TRUE DRA7XX_FALSE CMEM_TRUE CMEM_FALSE KDIR_TRUE KDIR_FALSE KERNEL_INSTALL_DIR_TRUE KERNEL_INSTALL_DIR_FALSE DRM_TRUE DRM_FALSE AF_RPMSG_TRUE AF_RPMSG_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
ac_env_KERNEL_INSTALL_DIR_value=$KERNEL_INSTALL_DIR
ac_cv_env_KERNEL_INSTALL_DIR_set=${KERNEL_INSTALL_DIR+set}
ac_cv_env_KERNEL_INSTALL_DIR_value=$KERNEL_INSTALL_DIR
+ac_env_AF_RPMSG_set=${AF_RPMSG+set}
+ac_env_AF_RPMSG_value=$AF_RPMSG
+ac_cv_env_AF_RPMSG_set=${AF_RPMSG+set}
+ac_cv_env_AF_RPMSG_value=$AF_RPMSG
ac_env_DRM_PREFIX_set=${DRM_PREFIX+set}
ac_env_DRM_PREFIX_value=$DRM_PREFIX
ac_cv_env_DRM_PREFIX_set=${DRM_PREFIX+set}
Installation path directory to the CMEM libraries
KERNEL_INSTALL_DIR
Installation path to the Linux kernel.
+ AF_RPMSG Address Family used by the RPMSG driver
DRM_PREFIX Installation location to the DRM library.
Use these variables to override the choices made by `configure' or to help
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3719 "configure"' > conftest.$ac_ext
+ echo '#line 3724 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6144: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6149: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6148: \$? = $ac_status" >&5
+ echo "$as_me:6153: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6412: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6417: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6416: \$? = $ac_status" >&5
+ echo "$as_me:6421: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6516: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6521: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6520: \$? = $ac_status" >&5
+ echo "$as_me:6525: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8861 "configure"
+#line 8866 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8961 "configure"
+#line 8966 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11301: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11306: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11305: \$? = $ac_status" >&5
+ echo "$as_me:11310: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11405: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11410: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11409: \$? = $ac_status" >&5
+ echo "$as_me:11414: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12712: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12717: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12716: \$? = $ac_status" >&5
+ echo "$as_me:12721: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12980: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12985: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12984: \$? = $ac_status" >&5
+ echo "$as_me:12989: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13084: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13089: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13088: \$? = $ac_status" >&5
+ echo "$as_me:13093: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
+
# Test platform variable for setting
if test "x$PLATFORM" = "xOMAPL138"; then
{ echo "$as_me:$LINENO: PLATFORM is set to ${PLATFORM}" >&5
fi
-# Test for required KERNEL path
-if test "x$KERNEL_INSTALL_DIR" = "x"; then
- { { echo "$as_me:$LINENO: error: Kernel path for ${PLATFORM} is not set" >&5
-echo "$as_me: error: Kernel path for ${PLATFORM} is not set" >&2;}
+# If platform is specified, make sure at least one of
+# KERNEL_INSTALL_DIR or AF_MSG are set.
+if test -n "$PLATFORM" -a -z "$KERNEL_INSTALL_DIR" -a -z "$AF_RPMSG"; then
+ { { echo "$as_me:$LINENO: error: Must set at least one of KERNEL_INSTALL_DIR or AF_RPMSG" >&5
+echo "$as_me: error: Must set at least one of KERNEL_INSTALL_DIR or AF_RPMSG" >&2;}
{ (exit 1); exit 1; }; }
fi
+
# Define specific variables to be used in Makefile.am
+if test -n "$KERNEL_INSTALL_DIR"; then
+ KERNEL_INSTALL_DIR_TRUE=
+ KERNEL_INSTALL_DIR_FALSE='#'
+else
+ KERNEL_INSTALL_DIR_TRUE='#'
+ KERNEL_INSTALL_DIR_FALSE=
+fi
+
+
+
if test "x$DRM_PREFIX" != "x"; then
DRM_TRUE=
DRM_FALSE='#'
fi
+
+if test -n "$AF_RPMSG"; then
+ AF_RPMSG_TRUE=
+ AF_RPMSG_FALSE='#'
+else
+ AF_RPMSG_TRUE='#'
+ AF_RPMSG_FALSE=
+fi
+
+
# Generate Makefile(s)
ac_config_files="$ac_config_files Makefile"
ac_config_files="$ac_config_files linux/src/tests/Makefile"
+ ac_config_files="$ac_config_files linux/src/transport/Makefile"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${KERNEL_INSTALL_DIR_TRUE}" && test -z "${KERNEL_INSTALL_DIR_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"KERNEL_INSTALL_DIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"KERNEL_INSTALL_DIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${DRM_TRUE}" && test -z "${DRM_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"DRM\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${AF_RPMSG_TRUE}" && test -z "${AF_RPMSG_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AF_RPMSG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AF_RPMSG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
"linux/src/mm/libmmrpc.pc" ) CONFIG_FILES="$CONFIG_FILES linux/src/mm/libmmrpc.pc" ;;
"linux/src/daemon/Makefile" ) CONFIG_FILES="$CONFIG_FILES linux/src/daemon/Makefile" ;;
"linux/src/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES linux/src/tests/Makefile" ;;
+ "linux/src/transport/Makefile" ) CONFIG_FILES="$CONFIG_FILES linux/src/transport/Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
s,@PLATFORM@,$PLATFORM,;t t
s,@CMEM_INSTALL_DIR@,$CMEM_INSTALL_DIR,;t t
s,@KERNEL_INSTALL_DIR@,$KERNEL_INSTALL_DIR,;t t
+s,@AF_RPMSG@,$AF_RPMSG,;t t
s,@DRM_PREFIX@,$DRM_PREFIX,;t t
s,@OMAPL138_TRUE@,$OMAPL138_TRUE,;t t
s,@OMAPL138_FALSE@,$OMAPL138_FALSE,;t t
s,@CMEM_FALSE@,$CMEM_FALSE,;t t
s,@KDIR_TRUE@,$KDIR_TRUE,;t t
s,@KDIR_FALSE@,$KDIR_FALSE,;t t
+s,@KERNEL_INSTALL_DIR_TRUE@,$KERNEL_INSTALL_DIR_TRUE,;t t
+s,@KERNEL_INSTALL_DIR_FALSE@,$KERNEL_INSTALL_DIR_FALSE,;t t
s,@DRM_TRUE@,$DRM_TRUE,;t t
s,@DRM_FALSE@,$DRM_FALSE,;t t
+s,@AF_RPMSG_TRUE@,$AF_RPMSG_TRUE,;t t
+s,@AF_RPMSG_FALSE@,$AF_RPMSG_FALSE,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
diff --git a/configure.ac b/configure.ac
index 3bd2d896c1bba40c9beb32bd6f5763cb2ace1ce7..e6cb19f99f201d0b2a804052ee39d6f693df600b 100644 (file)
--- a/configure.ac
+++ b/configure.ac
#
-# Copyright (c) 2013-2014, Texas Instruments Incorporated
+# Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' and 'DRA7XX'. If not defined all platforms will be built.)
AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries)
AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.)
+AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver)
AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.)
# Test platform variable for setting
[AC_MSG_NOTICE([PLATFORM is not set. All supported platforms will be built ....])],
[AC_MSG_ERROR([PLATFORM is set to "${PLATFORM}": run ./configure --help for available PLATFORM options])])])])])])])])])])
-# Test for required KERNEL path
-AS_IF([test "x$KERNEL_INSTALL_DIR" = "x"],
- [AC_MSG_ERROR([Kernel path for ${PLATFORM} is not set])])
+# If platform is specified, make sure at least one of
+# KERNEL_INSTALL_DIR or AF_MSG are set.
+AS_IF([test -n "$PLATFORM" -a -z "$KERNEL_INSTALL_DIR" -a -z "$AF_RPMSG"],
+ [AC_MSG_ERROR([Must set at least one of KERNEL_INSTALL_DIR or AF_RPMSG])])
# Ignore KERNEL path when no platform is set
AS_IF([test "x$PLATFORM" = "x"], [KERNEL_INSTALL_DIR=])
AC_SUBST([PLATFORM])
AC_SUBST([CMEM_INSTALL_DIR])
AC_SUBST([KERNEL_INSTALL_DIR])
+AC_SUBST([AF_RPMSG])
AC_SUBST([DRM_PREFIX])
# Define specific variables to be used in Makefile.am
AM_CONDITIONAL([DRA7XX], [test "x$PLATFORM" = "xDRA7XX"])
AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"])
AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"])
+AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"])
AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"])
+AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"])
# Generate Makefile(s)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([linux/src/mm/libmmrpc.pc])
AC_CONFIG_FILES([linux/src/daemon/Makefile])
AC_CONFIG_FILES([linux/src/tests/Makefile])
+AC_CONFIG_FILES([linux/src/transport/Makefile])
AC_OUTPUT
echo \
index d24a6a168d0c9a04ec3e9d84e7a49b1b9e7d2a0e..d9721079c6102471a7794a5418af3944ca6134f3 100644 (file)
/*
- * Copyright (c) 2008-2014, Texas Instruments Incorporated
+ * Copyright (c) 2008-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define MESSAGEQ_H_0xded2
/* Utilities headers */
+#include <ti/ipc/MessageQ.h>
#include <ti/ipc/NameServer.h>
/*! Shift for Trace setting */
#define MessageQ_TRACESHIFT (UInt) 12
-
/*!
* @brief Structure defining config parameters for the MessageQ Buf module.
*/
/*!< Maximum number of MessageQs that can be dynamically created */
UInt maxNameLen;
/*!< Maximum length for Message queue names */
+ UInt numReservedEntries;
+ /*!< Number of reserved message queue indexes */
} MessageQ_Config;
/* =============================================================================
index 83bbce59e6927941550b9e7cbed6aa33137405fd..d7f505f0b6f172b19ace6c794cbe7963ba2a628e 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <ti/ipc/MultiProc.h>
#include <_MultiProc.h>
+/*
+ * ======== MultiProc_getBaseIdOfCluster ========
+ */
+UInt16 MultiProc_getBaseIdOfCluster()
+{
+ return (_MultiProc_cfg.baseIdOfCluster);
+}
+
/*
* ======== MultiProc_getId ========
*/
assert(name != NULL);
id = MultiProc_INVALIDID;
- for (i = 0; i < _MultiProc_cfg.numProcessors; i++) {
+ for (i = 0; i < _MultiProc_cfg.numProcsInCluster; i++) {
if ((_MultiProc_cfg.nameList[i] != NULL) &&
(strcmp(name, _MultiProc_cfg.nameList[i]) == 0)) {
- id = i;
+ id = _MultiProc_cfg.baseIdOfCluster + i;
}
}
return (id);
{
assert(id < _MultiProc_cfg.numProcessors);
- return (_MultiProc_cfg.nameList[id]);
+ return (_MultiProc_cfg.nameList[id - _MultiProc_cfg.baseIdOfCluster]);
}
/*
return (_MultiProc_cfg.numProcessors);
}
+/*
+ * ======== MultiProc_getNumProcsInCluster ========
+ */
+UInt16 MultiProc_getNumProcsInCluster()
+{
+ return (_MultiProc_cfg.numProcsInCluster);
+}
/*
* ======== MultiProc_self ========
diff --git a/ipc-linux.mak b/ipc-linux.mak
index 68e9617232e2c8f9c0f7b64e89843fad2d9cc3f8..58a9ceac6c9cf3b5d97c1cec18808d2b4b5a70c5 100644 (file)
--- a/ipc-linux.mak
+++ b/ipc-linux.mak
#
-# Copyright (c) 2012-2014, Texas Instruments Incorporated
+# Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
.PHONY: config config-static config-shared
-# If you need to add any compile flags to the build of IPC user libraries,
-# you can use the CFLAGS option to the configure script.
+# If you need to add any compile flags to the build of IPC user
+# libraries, you can use the CFLAGS option to the configure script.
+# For example, to following would add preprocessor define called
+# PRIORITY with a value of 5.
#
-# For example, in the very rare case where your kernel's AF_RPMSG
-# definition isn't correctly detected by IPC (see
-# linux/include/net/rpmsg.h), you can provide your kernel's definition
-# of AF_RPMSG by adding this CFLAGS line to the configure commands below
-# to force the value of AF_RPMSG to 42:
-#
-# CFLAGS="-DAF_RPMSG=42"
+# CFLAGS="-DPRIORITY=5"
# If the user set DESTDIR (e.g. in products.mak), pass that value via
# --prefix= option. If DESTDIR is not set, --prefix is not thrown and
PLATFORM=$(PLATFORM) \
CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
- DRM_PREFIX=$(DRM_PREFIX)
+ DRM_PREFIX=$(DRM_PREFIX) \
+ AF_RPMSG=$(AF_RPMSG)
config-static:
PLATFORM=$(PLATFORM) \
CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
- DRM_PREFIX=$(DRM_PREFIX)
+ DRM_PREFIX=$(DRM_PREFIX) \
+ AF_RPMSG=$(AF_RPMSG)
config-shared:
PLATFORM=$(PLATFORM) \
CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
- DRM_PREFIX=$(DRM_PREFIX)
+ DRM_PREFIX=$(DRM_PREFIX) \
+ AF_RPMSG=$(AF_RPMSG)
diff --git a/ipc-qnx.mak b/ipc-qnx.mak
index a903d7c4908268e5d2ed731e6017aaaa407fbd10..3006cee40d474e7238c7a9f64a8eef11d96dd40a 100644 (file)
--- a/ipc-qnx.mak
+++ b/ipc-qnx.mak
#
-# Copyright (c) 2012-2014, Texas Instruments Incorporated
+# Copyright (c) 2012-2015, Texas Instruments Incorporated
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
clean:
@echo "cleaning Qnx user libraries ..."
- @make -C qnx PLATFORM=$(PLATFORM) clean
+ @make -C qnx PLATFORM=$(PLATFORM) IPC_REPO=`pwd` clean
install: .install,$(PLATFORM)
diff --git a/linux/etc/Makefile.in b/linux/etc/Makefile.in
index 3d120dfc7714fc82ae415fcf8f98b3f81192d993..35ab82947f6f4bde779ed93c980afd12a9815143 100644 (file)
--- a/linux/etc/Makefile.in
+++ b/linux/etc/Makefile.in
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
index 78f741933a5f70c1be34af44220fad8a71ac8132..afd3a52d908bd06338de1792c42da25228bddc81 100644 (file)
/*
- * Copyright (c) 2008-2014, Texas Instruments Incorporated
+ * Copyright (c) 2008-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/*!< Linux "remoteproc index" for processors in the system */
UInt16 id;
/*!< Local Proc ID. This needs to be set before calling any other APIs */
+ UInt16 numProcsInCluster;
+ /*!< number of processors in the cluster */
+ UInt16 baseIdOfCluster;
+ /*!< processor ID of first entry in cluster */
} MultiProc_Config;
/* =============================================================================
diff --git a/linux/include/_lad.h b/linux/include/_lad.h
index a0a52925ee7410e1ea7d2916a8c7654effea7c42..00a0c1e6b9216552071698fb71f1992f4c60bdce 100644 (file)
--- a/linux/include/_lad.h
+++ b/linux/include/_lad.h
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <_GateMP.h>
#include <GateHWSpinlock.h>
#include <sys/time.h>
+#include <ti/ipc/namesrv/_NameServerRemoteRpmsg.h>
extern Bool logFile;
extern FILE *logPtr;
fflush(logPtr); \
}
+#define LOG3(a, b, c, d) \
+ if (logFile == TRUE) { \
+ struct timeval tv; \
+ gettimeofday(&tv, NULL); \
+ fprintf(logPtr, "[%d.%06d] " a, \
+ (unsigned int)(tv.tv_sec - start_tv.tv_sec), \
+ (unsigned int)tv.tv_usec, b, c, d); \
+ fflush(logPtr); \
+ }
+
/* macros for generating verbose output: */
#define PRINTVERBOSE0(a) \
if (verbose == TRUE) { printf(a); }
#define LAD_MESSAGEQCREATEMAXNAMELEN 32
-#define LAD_MAXENTRYNAMELEN 32 /* size limit for LAD NameServer name */
+#define LAD_MAXENTRYNAMELEN MAXNAMEINCHAR /* max for LAD NameServer name */
#define LAD_MAXENTRYVALUELEN 32 /* size limit for LAD NameServer value */
typedef enum {
index 43891966439c27c3f8587f17df82030cd513816b..7bef96fe070daa90b261f37f962f705b37961318 100644 (file)
#define FAIL -1
//#define NULL '\0'
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
#if defined (IPC_BUILDOS_ANDROID)
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
diff --git a/linux/include/ti/ipc/interfaces/IMessageQTransport.h b/linux/include/ti/ipc/interfaces/IMessageQTransport.h
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ * ======== IMessageQTransport.h ========
+ */
+
+#ifndef IMESSAGEQTRANSPORT_H
+#define IMESSAGEQTRANSPORT_H
+
+#include <ti/ipc/interfaces/ITransport.h>
+
+/* opaque instance handle */
+typedef struct IMessageQTransport_Object *IMessageQTransport_Handle;
+
+#define IMessageQTransport_TypeId 0x02
+
+/* virtual functions */
+typedef struct IMessageQTransport_Fxns {
+ Int (*bind)(void *handle, UInt32 queueId);
+ Int (*unbind)(void *handle, UInt32 queueId);
+ Bool (*put)(void *handle, Ptr msg);
+} IMessageQTransport_Fxns;
+
+/* abstract instance object */
+typedef struct IMessageQTransport_Object {
+ ITransport_Object base; /* inheritance */
+ IMessageQTransport_Fxns *fxns; /* virtual functions */
+} IMessageQTransport_Object;
+
+/* function stubs */
+static inline
+Int IMessageQTransport_bind(IMessageQTransport_Handle inst, UInt32 queueId)
+{
+ IMessageQTransport_Object *obj = (IMessageQTransport_Object *)inst;
+ return obj->fxns->bind((void *)inst, queueId);
+}
+
+static inline
+Int IMessageQTransport_unbind(IMessageQTransport_Handle inst, UInt32 queueId)
+{
+ IMessageQTransport_Object *obj = (IMessageQTransport_Object *)inst;
+ return obj->fxns->unbind((void *)inst, queueId);
+}
+
+static inline
+Bool IMessageQTransport_put(IMessageQTransport_Handle inst, Ptr msg)
+{
+ IMessageQTransport_Object *obj = (IMessageQTransport_Object *)inst;
+ return obj->fxns->put((void *)inst, msg);
+}
+
+/* instance convertors */
+static inline
+ITransport_Handle IMessageQTransport_upCast(IMessageQTransport_Handle inst)
+{
+ IMessageQTransport_Object *obj = (IMessageQTransport_Object *)inst;
+ return (ITransport_Handle)&obj->base;
+}
+
+static inline
+IMessageQTransport_Handle IMessageQTransport_downCast(ITransport_Handle base)
+{
+ return (IMessageQTransport_Handle)base;
+}
+
+#endif /* IMESSAGEQTRANSPORT_H */
diff --git a/linux/include/ti/ipc/interfaces/INetworkTransport.h b/linux/include/ti/ipc/interfaces/INetworkTransport.h
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ * ======== INetworkTransport.h ========
+ */
+
+#ifndef INETWORKTRANSPORT_H
+#define INETWORKTRANSPORT_H
+
+#include <ti/ipc/interfaces/ITransport.h>
+
+
+/*
+ * ======== INetworkTransport_Handle ========
+ * Opaque handle to interface instance object
+ */
+typedef struct INetworkTransport_Object *INetworkTransport_Handle;
+
+/*
+ * ======== INetworkTransport_TypeId ========
+ * Unique identifier for this interface
+ */
+#define INetworkTransport_TypeId 0x03
+
+/*
+ * ======== INetworkTransport_Fxns ========
+ * Interface virtual function table
+ */
+typedef struct INetworkTransport_Fxns {
+ Int (*bind)(void *handle, UInt32 queueId);
+ Int (*unbind)(void *handle, UInt32 queueId);
+ Bool (*put)(void *handle, Ptr msg);
+} INetworkTransport_Fxns;
+
+/*
+ * ======== INetworkTransport_Object ========
+ * Abstract instance object
+ */
+typedef struct INetworkTransport_Object {
+ ITransport_Object base; /* inheritance */
+ INetworkTransport_Fxns *fxns; /* virtual functions */
+} INetworkTransport_Object;
+
+/*
+ * ======== INetworkTransport_bind ========
+ * Instance function stub
+ */
+static inline
+Bool INetworkTransport_bind(INetworkTransport_Handle inst, UInt32 queueId)
+{
+ INetworkTransport_Object *obj = (INetworkTransport_Object *)inst;
+ return (obj->fxns->bind((void *)inst, queueId));
+}
+
+/*
+ * ======== INetworkTransport_unbind ========
+ * Instance function stub
+ */
+static inline
+Bool INetworkTransport_unbind(INetworkTransport_Handle inst, UInt32 queueId)
+{
+ INetworkTransport_Object *obj = (INetworkTransport_Object *)inst;
+ return (obj->fxns->unbind((void *)inst, queueId));
+}
+
+/*
+ * ======== INetworkTransport_put ========
+ * Instance function stub
+ */
+static inline
+Bool INetworkTransport_put(INetworkTransport_Handle inst, Ptr msg)
+{
+ INetworkTransport_Object *obj = (INetworkTransport_Object *)inst;
+ return (obj->fxns->put((void *)inst, msg));
+}
+
+/*
+ * ======== INetworkTransport_upCast ========
+ * Instance converter
+ */
+static inline
+ITransport_Handle INetworkTransport_upCast(INetworkTransport_Handle inst)
+{
+ INetworkTransport_Object *obj = (INetworkTransport_Object *)inst;
+ return ((ITransport_Handle)&obj->base);
+}
+
+/*
+ * ======== INetworkTransport_downCast ========
+ * Instance converter
+ */
+static inline
+INetworkTransport_Handle INetworkTransport_downCast(ITransport_Handle base)
+{
+ return ((INetworkTransport_Handle)base);
+}
+
+#endif /* INETWORKTRANSPORT_H */
diff --git a/linux/include/ti/ipc/interfaces/ITransport.h b/linux/include/ti/ipc/interfaces/ITransport.h
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * ======== ITransport.h ========
+ */
+
+#ifndef ITRANSPORT_H
+#define ITRANSPORT_H
+
+/* opaque instance handle */
+typedef struct ITransport_Object *ITransport_Handle;
+
+#define ITransport_TypeId 0x01
+
+/* instance object */
+typedef struct ITransport_Object {
+ Int interfaceType;
+} ITransport_Object;
+
+/* instance functions */
+static inline
+Int ITransport_itype(ITransport_Handle inst)
+{
+ ITransport_Object *obj = (ITransport_Object *)inst;
+ return obj->interfaceType;
+}
+
+#endif /* ITRANSPORT_H */
diff --git a/hlos_common/include/_NameServerRemoteRpmsg.h b/linux/include/ti/ipc/transports/TransportRpmsg.h
similarity index 57%
rename from hlos_common/include/_NameServerRemoteRpmsg.h
rename to linux/include/ti/ipc/transports/TransportRpmsg.h
index b11334a75dac2fa5cf9f34811d9d790e07637ce9..81505e04c87cfc0e9f92acb483f253c7e4ef9fc8 100644 (file)
rename from hlos_common/include/_NameServerRemoteRpmsg.h
rename to linux/include/ti/ipc/transports/TransportRpmsg.h
index b11334a75dac2fa5cf9f34811d9d790e07637ce9..81505e04c87cfc0e9f92acb483f253c7e4ef9fc8 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * ======== TransportRpmsg.h ========
+ */
+
+/**
+ * @file TransportRpmsg.h
+ *
+ * @brief Rpmsg transports implemenation
+ *
+ * The transports can be register with MessageQ. This is done
+ * via the MessageQ_registerTransport function.
+ */
+
+#ifndef _TransportRpmsg_
+#define _TransportRpmsg_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ti/ipc/Ipc.h>
+#include <ti/ipc/interfaces/IMessageQTransport.h>
+
+extern Ipc_TransportFactoryFxns TransportRpmsg_Factory;
+
+struct TransportRpmsg_Params {
+ UInt16 rprocId;
+};
+typedef struct TransportRpmsg_Params TransportRpmsg_Params;
+
+typedef IMessageQTransport_Handle TransportRpmsg_Handle;
+
+TransportRpmsg_Handle TransportRpmsg_create(TransportRpmsg_Params *param,
+ Int *attachStatus);
+Void TransportRpmsg_delete(TransportRpmsg_Handle *hp);
+
+IMessageQTransport_Handle TransportRpmsg_upCast(TransportRpmsg_Handle handle);
+TransportRpmsg_Handle TransportRpmsg_downCast(IMessageQTransport_Handle base);
+
+#ifdef __cplusplus
+}
+#endif
-#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 MAXVALUELEN 75
-
-#define NAMESERVER_GET_TIMEOUT 40000 /* microseconds */
-
-#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 */
- Bits32 seqNum; /* NameServer request sequence # */
- /* name of NameServer instance */
- Bits32 instanceName[NAMEARRAYSZIE];
- /* name of NameServer entry */
- Bits32 name[NAMEARRAYSZIE];
- Bits32 valueLen; /* len of value */
- Bits32 valueBuf[MAXVALUELEN]; /* value buffer */
-} NameServerMsg;
+#endif
diff --git a/linux/src/api/Ipc.c b/linux/src/api/Ipc.c
index 6dbb0b6cf622570d033405038a3e0689478c0bf2..9dfb176879a3c344c92e152ac189af726b1f00ed 100644 (file)
--- a/linux/src/api/Ipc.c
+++ b/linux/src/api/Ipc.c
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* module.
*/
-/* Standard headers */
+/* standard headers */
+#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-/* Common IPC headers: */
+/* package headers */
#include <ti/ipc/Std.h>
#include <ti/ipc/Ipc.h>
#include <ti/ipc/NameServer.h>
#include <_MessageQ.h>
#include <_NameServer.h>
-GateHWSpinlock_Config _GateHWSpinlock_cfgParams;
+/* module definition */
+typedef struct {
+ Int refCount;
+ pthread_mutex_t gate;
+ Ipc_TransportFactoryFxns *transportFactory;
+} Ipc_Module;
+
+
+/* =============================================================================
+ * Globals
+ * =============================================================================
+ */
+static Ipc_Module Ipc_module = {
+ .refCount = 0,
+ .gate = PTHREAD_MUTEX_INITIALIZER,
+ .transportFactory = NULL
+};
+GateHWSpinlock_Config _GateHWSpinlock_cfgParams;
static LAD_ClientHandle ladHandle;
-static void cleanup(int arg);
/** ============================================================================
* Functions
* ============================================================================
*/
-/* Function to start Ipc */
-Int Ipc_start (Void)
+static void cleanup(int arg);
+
+
+/*
+ * ======== Ipc_start ========
+ */
+Int Ipc_start(Void)
{
- MessageQ_Config msgqCfg;
- MultiProc_Config mpCfg;
+ MessageQ_Config msgqCfg;
+ MultiProc_Config mpCfg;
#if defined(GATEMP_SUPPORT)
- GateHWSpinlock_Config gateHWCfg;
+ GateHWSpinlock_Config gateHWCfg;
#endif
- Int32 status;
- LAD_Status ladStatus;
- UInt16 rprocId;
- Int32 attachedAny = 0;
+ Int status;
+ LAD_Status ladStatus;
+
+ /* function must be serialized */
+ pthread_mutex_lock(&Ipc_module.gate);
+
+ /* ensure only first thread performs startup procedure */
+ if (++Ipc_module.refCount > 1) {
+ status = Ipc_S_ALREADYSETUP;
+ goto exit;
+ }
+
+ /* make sure transport factory has been configured */
+ if (Ipc_module.transportFactory == NULL) {
+ status = Ipc_E_INVALIDSTATE;
+ goto exit;
+ }
/* Catch ctrl-C, and cleanup: */
(void) signal(SIGINT, cleanup);
goto exit;
}
- /*
- * Get MultiProc configuration from LAD and initialize local MultiProc
- * config structure.
+ /* Get MultiProc configuration from LAD and initialize local
+ * MultiProc config structure.
*/
MultiProc_getConfig(&mpCfg);
_MultiProc_initCfg(&mpCfg);
status = NameServer_setup();
+
if (status >= 0) {
MessageQ_getConfig(&msgqCfg);
MessageQ_setup(&msgqCfg);
- /* Now attach to all remote processors, assuming they are up. */
- for (rprocId = 0; rprocId < MultiProc_getNumProcessors(); rprocId++) {
- if (0 == rprocId) {
- /* Skip host, which should always be 0th entry. */
- continue;
- }
- status = MessageQ_attach(rprocId, NULL);
- if (status == MessageQ_E_RESOURCE) {
- continue;
- }
- if (status < 0) {
- printf("Ipc_start: MessageQ_attach(%d) failed: %d\n",
- rprocId, status);
- status = Ipc_E_FAIL;
+ /* invoke the transport factory create method */
+ status = Ipc_module.transportFactory->createFxn();
- break;
- }
- else {
- attachedAny = 1;
- }
- }
- if (attachedAny) {
- status = Ipc_S_SUCCESS;
+ if (status < 0) {
+ goto exit;
}
}
else {
gatempstart_fail:
GateHWSpinlock_stop();
gatehwspinlockstart_fail:
- for (rprocId = rprocId - 1; (rprocId > 0) && (status >= 0); rprocId--) {
- MessageQ_detach(rprocId);
+#if 0
+ for (procId = procId - 1; (procId > 0) && (status >= 0); procId--) {
+ MessageQ_detach(procId);
}
#endif
+#endif
exit:
+ /* if error, must decrement reference count */
+ if (status < 0) {
+ Ipc_module.refCount--;
+ }
+
+ pthread_mutex_unlock(&Ipc_module.gate);
+
return (status);
}
-
-/* Function to stop Ipc */
-Int Ipc_stop (Void)
+/*
+ * ======== Ipc_stop ========
+ */
+Int Ipc_stop(Void)
{
- Int32 status = Ipc_S_SUCCESS;
- LAD_Status ladStatus;
- UInt16 rprocId;
-
- /* Now detach from all remote processors, assuming they are up. */
- for (rprocId = 0;
- (rprocId < MultiProc_getNumProcessors()) && (status >= 0);
- rprocId++) {
- if (0 == rprocId) {
- /* Skip host, which should always be 0th entry. */
- continue;
+ Int32 status = Ipc_S_SUCCESS;
+ LAD_Status ladStatus;
+ Int i;
+ UInt16 procId;
+ UInt16 clusterSize;
+ UInt16 clusterBase;
+
+ /* function must be serialized */
+ pthread_mutex_lock(&Ipc_module.gate);
+
+ /* ensure only last thread performs stop procedure */
+ if (--Ipc_module.refCount > 0) {
+ goto exit;
+ }
+
+ /* invoke the transport factory delete method */
+ Ipc_module.transportFactory->deleteFxn();
+
+ /* needed to enumerate processors in cluster */
+ clusterSize = MultiProc_getNumProcsInCluster();
+ clusterBase = MultiProc_getBaseIdOfCluster();
+
+ /* detach from all remote processors, assuming they are up */
+ for (i = 0, procId = clusterBase; i < clusterSize; i++, procId++) {
+
+ /* no need to detach from myself */
+ if (MultiProc_self() == procId) {
+ continue;
}
- status = MessageQ_detach(rprocId);
+#if 0
+ status = MessageQ_detach(procId);
if (status < 0) {
printf("Ipc_stop: MessageQ_detach(%d) failed: %d\n",
- rprocId, status);
+ procId, status);
status = Ipc_E_FAIL;
goto exit;
}
+#endif
}
status = MessageQ_destroy();
}
exit:
+ pthread_mutex_unlock(&Ipc_module.gate);
+
+ return (status);
+}
+
+/*
+ * ======== Ipc_transportConfig ========
+ */
+Int Ipc_transportConfig(Ipc_TransportFactoryFxns *factory)
+{
+ Int status;
+
+ pthread_mutex_lock(&Ipc_module.gate);
+ status = Ipc_S_SUCCESS;
+
+ /* transport configuration must happen before start phase */
+ if (Ipc_module.refCount != 0) {
+ status = Ipc_E_INVALIDSTATE;
+ goto exit;
+ }
+
+ /* store factory address in module state */
+ Ipc_module.transportFactory = factory;
+
+exit:
+ pthread_mutex_unlock(&Ipc_module.gate);
+
return (status);
}
index 940261523d443a6512da930d5ff34feb30afdefc..cd94065337c13228d9505eb9ecefea485a9be071 100644 (file)
##
-## Copyright (c) 2013-2014, Texas Instruments Incorporated
+## Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
##
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
- -I$(top_srcdir)/packages -I$(KERNEL_INSTALL_DIR)/include/generated/uapi\
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall
if DRA7XX
AM_CFLAGS += -DGATEMP_SUPPORT
endif
+if KERNEL_INSTALL_DIR
+AM_CFLAGS += -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
+endif
+
+AM_CFLAGS += -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages @AM_CFLAGS@
+
###############################################################################
# THE LIBRARIES TO BUILD
###############################################################################
index 930634cfe6e85954d397b673a99996b2563a12f4..7586aaf2462ec7a652e5535d31b0e2e37e3bd24e 100644 (file)
build_triplet = @build@
host_triplet = @host@
@DRA7XX_TRUE@am__append_1 = -DGATEMP_SUPPORT
-@DRA7XX_TRUE@am__append_2 = $(top_srcdir)/linux/include/IGateProvider.h \
+@KERNEL_INSTALL_DIR_TRUE@am__append_2 = -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
+@DRA7XX_TRUE@am__append_3 = $(top_srcdir)/linux/include/IGateProvider.h \
@DRA7XX_TRUE@ $(top_srcdir)/linux/include/GateHWSpinlock.h \
@DRA7XX_TRUE@ $(top_srcdir)/linux/include/GateMutex.h \
@DRA7XX_TRUE@ $(top_srcdir)/linux/include/GateMP_config.h \
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
# additional include paths necessary to compile the library
-AM_CFLAGS = -I$(top_srcdir)/linux/include \
- -I$(top_srcdir)/hlos_common/include -I$(top_srcdir)/packages \
- -I$(KERNEL_INSTALL_DIR)/include/generated/uapi -D_GNU_SOURCE \
- -Wall @AM_CFLAGS@ $(am__append_1)
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall \
+ $(am__append_1) $(am__append_2) -I$(top_srcdir)/linux/include \
+ -I$(top_srcdir)/packages @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
$(top_srcdir)/packages/ti/ipc/MultiProc.h \
$(top_srcdir)/packages/ti/ipc/MessageQ.h \
$(top_srcdir)/linux/include/ti/ipc/Std.h MessageQ.c \
- MultiProc.c NameServer.c Ipc.c $(am__append_2)
+ MultiProc.c NameServer.c Ipc.c $(am__append_3)
# Add version info to the shared library
libtiipc_la_LDFLAGS = -version-info 1:0:0
index 8b958cbcba7cdccbd0add2425a606d5d21ffd2a2..53185fcdabfce7d44d74f0765cb577befcbe210d 100644 (file)
--- a/linux/src/api/MessageQ.c
+++ b/linux/src/api/MessageQ.c
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <ti/ipc/NameServer.h>
#include <ti/ipc/MultiProc.h>
#include <_MultiProc.h>
+#define MessageQ_internal 1 /* must be defined before include file */
#include <ti/ipc/MessageQ.h>
#include <_MessageQ.h>
+#include <ti/ipc/interfaces/ITransport.h>
+#include <ti/ipc/interfaces/IMessageQTransport.h>
+#include <ti/ipc/interfaces/INetworkTransport.h>
/* Socket Headers */
#include <sys/select.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/eventfd.h>
-#include <sys/socket.h>
+#include <sys/queue.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <pthread.h>
-
-/* Socket Protocol Family */
-#include <net/rpmsg.h>
-
-/* Socket utils: */
-#include <SocketFxns.h>
+#include <semaphore.h>
#include <ladclient.h>
#include <_lad.h>
*/
#define MessageQ_NAMESERVER "MessageQ"
-/*!
- * @brief Value of an invalid socket ID:
- */
-#define Transport_INVALIDSOCKET (0xFFFFFFFF)
+#define MessageQ_MAXTRANSPORTS 8
-/* More magic rpmsg port numbers: */
-#define MESSAGEQ_RPMSG_PORT 61
-#define MESSAGEQ_RPMSG_MAXSIZE 512
+#define MessageQ_GROWSIZE 32
/* Trace flag settings: */
#define TRACESHIFT 12
* =============================================================================
*/
+/* params structure evolution */
+typedef struct {
+ Void *synchronizer;
+} MessageQ_Params_Legacy;
+
+typedef struct {
+ Int __version;
+ Void *synchronizer;
+ MessageQ_QueueIndex queueIndex;
+} MessageQ_Params_Version2;
+
/* structure for MessageQ module state */
typedef struct MessageQ_ModuleObject {
- Int refCount;
- /*!< Reference count */
- NameServer_Handle nameServer;
- /*!< Handle to the local NameServer used for storing GP objects */
- pthread_mutex_t gate;
- /*!< Handle of gate to be used for local thread safety */
- MessageQ_Params defaultInstParams;
- /*!< Default instance creation parameters */
- int sock[MultiProc_MAXPROCESSORS];
- /*!< Sockets to for sending to each remote processor */
- int seqNum;
- /*!< Process-specific sequence number */
+ MessageQ_Handle *queues;
+ Int numQueues;
+ Int refCount;
+ NameServer_Handle nameServer;
+ pthread_mutex_t gate;
+ int seqNum;
+ IMessageQTransport_Handle transports[MultiProc_MAXPROCESSORS][2];
+ ITransport_Handle transInst[MessageQ_MAXTRANSPORTS];
+ MessageQ_PutHookFxn putHookFxn;
} MessageQ_ModuleObject;
+typedef struct MessageQ_CIRCLEQ_ENTRY {
+ CIRCLEQ_ENTRY(MessageQ_CIRCLEQ_ENTRY) elem;
+} MessageQ_CIRCLEQ_ENTRY;
+
/*!
* @brief Structure for the Handle for the MessageQ.
*/
typedef struct MessageQ_Object_tag {
- MessageQ_Params params;
- /*! Instance specific creation parameters */
- MessageQ_QueueId queue;
- /* Unique id */
- int fd[MultiProc_MAXPROCESSORS];
- /* File Descriptor to block on messages from remote processors. */
- int unblockFd;
- /* Write this fd to unblock the select() call in MessageQ _get() */
- void *serverHandle;
+ CIRCLEQ_HEAD(dummy2, MessageQ_CIRCLEQ_ENTRY) msgList;
+ MessageQ_Params params;
+ MessageQ_QueueId queue;
+ int unblocked;
+ void *serverHandle;
+ sem_t synchronizer;
} MessageQ_Object;
/* traces in this file are controlled via _MessageQ_verbose */
Bool _MessageQ_verbose = FALSE;
#define verbose _MessageQ_verbose
-
/* =============================================================================
* Globals
* =============================================================================
*/
static MessageQ_ModuleObject MessageQ_state =
{
- .refCount = 0,
- .nameServer = NULL,
+ .refCount = 0,
+ .nameServer = NULL,
+ .gate = PTHREAD_MUTEX_INITIALIZER,
+ .putHookFxn = NULL
};
/*!
*
* @brief Pointer to the MessageQ module state.
*/
-MessageQ_ModuleObject * MessageQ_module = &MessageQ_state;
+MessageQ_ModuleObject *MessageQ_module = &MessageQ_state;
+Void _MessageQ_grow(UInt16 queueIndex);
/* =============================================================================
- * Forward declarations of internal functions
+ * APIS
* =============================================================================
*/
-/* This is a helper function to initialize a message. */
-static Int transportCreateEndpoint(int * fd, UInt16 rprocId, UInt16 queueIndex);
-static Int transportCloseEndpoint(int fd);
-static Int transportGet(int sock, MessageQ_Msg * retMsg);
-static Int transportPut(MessageQ_Msg msg, UInt16 dstId, UInt16 dstProcId);
+Bool MessageQ_registerTransport(IMessageQTransport_Handle handle,
+ UInt16 rprocId, UInt priority)
+{
+ Int status = FALSE;
+ UInt16 clusterId;
-/* =============================================================================
- * APIS
- * =============================================================================
- */
-/* Function to get default configuration for the MessageQ module.
- *
+ if (handle == NULL) {
+ printf("MessageQ_registerTransport: invalid handle, must be non-NULL\n"
+ );
+
+ return status;
+ }
+
+ /* map procId to clusterId */
+ clusterId = rprocId - MultiProc_getBaseIdOfCluster();
+
+ if (clusterId >= MultiProc_MAXPROCESSORS) {
+ printf("MessageQ_registerTransport: invalid procId %d\n", rprocId);
+
+ return status;
+ }
+
+ if (MessageQ_module->transports[clusterId][priority] == NULL) {
+ MessageQ_module->transports[clusterId][priority] = handle;
+
+ status = TRUE;
+ }
+
+ return status;
+}
+
+Bool MessageQ_registerTransportId(UInt tid, ITransport_Handle inst)
+{
+ if (inst == NULL) {
+ printf("MessageQ_registerTransportId: invalid NULL handle\n");
+
+ return MessageQ_E_INVALIDARG;
+ }
+
+ if (tid >= MessageQ_MAXTRANSPORTS) {
+ printf("MessageQ_unregisterNetTransport: invalid transport id %d,"
+ "must be < %d\n", tid, MessageQ_MAXTRANSPORTS);
+
+ return MessageQ_E_INVALIDARG;
+ }
+
+ if (MessageQ_module->transInst[tid] != NULL) {
+ printf("MessageQ_registerTransportId: transport id %d already "
+ "registered\n", tid);
+
+ return MessageQ_E_ALREADYEXISTS;
+ }
+
+ MessageQ_module->transInst[tid] = inst;
+
+ return MessageQ_S_SUCCESS;
+}
+
+Void MessageQ_unregisterTransport(UInt16 rprocId, UInt priority)
+{
+ UInt16 clusterId;
+
+ /* map procId to clusterId */
+ clusterId = rprocId - MultiProc_getBaseIdOfCluster();
+
+ if (clusterId >= MultiProc_MAXPROCESSORS) {
+ printf("MessageQ_unregisterTransport: invalid rprocId %d\n", rprocId);
+
+ return;
+ }
+
+ MessageQ_module->transports[clusterId][priority] = NULL;
+}
+
+Void MessageQ_unregisterTransportId(UInt tid)
+{
+ if (tid >= MessageQ_MAXTRANSPORTS) {
+ printf("MessageQ_unregisterTransportId: invalid transport id %d, "
+ "must be < %d\n", tid, MessageQ_MAXTRANSPORTS);
+
+ return;
+ }
+
+ MessageQ_module->transInst[tid] = NULL;
+}
+
+/*
+ * Function to get default configuration for the MessageQ module.
*/
-Void MessageQ_getConfig (MessageQ_Config * cfg)
+Void MessageQ_getConfig(MessageQ_Config *cfg)
{
Int status;
LAD_ClientHandle handle;
}
if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
- PRINTVERBOSE1("MessageQ_getConfig: no LAD response, status=%d\n", status)
+ PRINTVERBOSE1("MessageQ_getConfig: no LAD response, status=%d\n",
+ status)
return;
}
status = rsp.messageQGetConfig.status;
"MessageQ_getConfig: got LAD response for client %d, status=%d\n",
handle, status)
- memcpy(cfg, &rsp.messageQGetConfig.cfg, sizeof(*cfg));
+ memcpy(cfg, &rsp.messageQGetConfig.cfg, sizeof (*cfg));
return;
}
-/* Function to setup the MessageQ module. */
-Int MessageQ_setup(const MessageQ_Config * cfg)
+/*
+ * Function to setup the MessageQ module.
+ */
+Int MessageQ_setup(const MessageQ_Config *cfg)
{
- Int status;
+ Int status = MessageQ_S_SUCCESS;
LAD_ClientHandle handle;
struct LAD_CommandObj cmd;
union LAD_ResponseObj rsp;
+ Int pri;
Int i;
+ Int tid;
+
+ /* this entire function must be serialized */
+ pthread_mutex_lock(&MessageQ_module->gate);
+
+ /* ensure only first thread performs startup procedure */
+ if (++MessageQ_module->refCount > 1) {
+ PRINTVERBOSE1("MessageQ module has been already setup, refCount=%d\n",
+ MessageQ_module->refCount)
+ status = MessageQ_S_ALREADYSETUP;
+ goto exit;
+ }
handle = LAD_findHandle();
if (handle == LAD_MAXNUMCLIENTS) {
- PRINTVERBOSE1(
- "MessageQ_setup: can't find connection to daemon for pid %d\n",
- getpid())
-
- return MessageQ_E_RESOURCE;
+ PRINTVERBOSE1("MessageQ_setup: can't find connection to daemon for "
+ "pid %d\n", getpid())
+ status = MessageQ_E_RESOURCE;
+ goto exit;
}
cmd.cmd = LAD_MESSAGEQ_SETUP;
memcpy(&cmd.args.messageQSetup.cfg, cfg, sizeof(*cfg));
if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
- PRINTVERBOSE1(
- "MessageQ_setup: sending LAD command failed, status=%d\n", status)
- return MessageQ_E_FAIL;
+ PRINTVERBOSE1("MessageQ_setup: sending LAD command failed, "
+ "status=%d\n", status)
+ status = MessageQ_E_FAIL;
+ goto exit;
}
if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
PRINTVERBOSE1("MessageQ_setup: no LAD response, status=%d\n", status)
- return(status);
+ status = MessageQ_E_FAIL;
+ goto exit;
}
status = rsp.setup.status;
- PRINTVERBOSE2(
- "MessageQ_setup: got LAD response for client %d, status=%d\n",
- handle, status)
+ PRINTVERBOSE2("MessageQ_setup: LAD response for client %d, status=%d\n",
+ handle, status)
- MessageQ_module->nameServer = rsp.setup.nameServerHandle;
MessageQ_module->seqNum = 0;
+ MessageQ_module->nameServer = rsp.setup.nameServerHandle;
+ MessageQ_module->numQueues = cfg->maxRuntimeEntries;
+ MessageQ_module->queues = calloc(cfg->maxRuntimeEntries,
+ sizeof(MessageQ_Handle));
- /* Create a default local gate. */
- pthread_mutex_init (&(MessageQ_module->gate), NULL);
-
- /* Clear sockets array. */
for (i = 0; i < MultiProc_MAXPROCESSORS; i++) {
- MessageQ_module->sock[i] = Transport_INVALIDSOCKET;
+ for (pri = 0; pri < 2; pri++) {
+ MessageQ_module->transports[i][pri] = NULL;
+ }
}
- return status;
+ for (tid = 0; tid < MessageQ_MAXTRANSPORTS; tid++) {
+ MessageQ_module->transInst[tid] = NULL;
+ }
+
+exit:
+ /* if error, must decrement reference count */
+ if (status < 0) {
+ MessageQ_module->refCount--;
+ }
+
+ pthread_mutex_unlock(&MessageQ_module->gate);
+
+ return (status);
}
/*
- * Function to destroy the MessageQ module.
- * Destroys socket/protocol maps; sockets themselves should have been
- * destroyed in MessageQ_delete() and MessageQ_detach() calls.
+ * MessageQ_destroy - destroy the MessageQ module.
*/
-Int MessageQ_destroy (void)
+Int MessageQ_destroy(void)
{
- Int status;
+ Int status = MessageQ_S_SUCCESS;
LAD_ClientHandle handle;
struct LAD_CommandObj cmd;
union LAD_ResponseObj rsp;
+ /* this entire function must be serialized */
+ pthread_mutex_lock(&MessageQ_module->gate);
+
+ /* ensure only last thread does the work */
+ if (--MessageQ_module->refCount > 0) {
+ goto exit;
+ }
+
handle = LAD_findHandle();
if (handle == LAD_MAXNUMCLIENTS) {
- PRINTVERBOSE1(
- "MessageQ_destroy: can't find connection to daemon for pid %d\n",
- getpid())
-
- return MessageQ_E_RESOURCE;
+ PRINTVERBOSE1("MessageQ_destroy: can't find connection to daemon "
+ "for pid %d\n", getpid())
+ status = MessageQ_E_RESOURCE;
+ goto exit;
}
cmd.cmd = LAD_MESSAGEQ_DESTROY;
cmd.clientId = handle;
if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
- PRINTVERBOSE1(
- "MessageQ_destroy: sending LAD command failed, status=%d\n", status)
- return MessageQ_E_FAIL;
+ PRINTVERBOSE1("MessageQ_destroy: sending LAD command failed, "
+ "status=%d\n", status)
+ status = MessageQ_E_FAIL;
+ goto exit;
}
if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
PRINTVERBOSE1("MessageQ_destroy: no LAD response, status=%d\n", status)
- return(status);
+ status = MessageQ_E_FAIL;
+ goto exit;
}
status = rsp.status;
- PRINTVERBOSE2(
- "MessageQ_destroy: got LAD response for client %d, status=%d\n",
- handle, status)
+ PRINTVERBOSE2("MessageQ_destroy: got LAD response for client %d, "
+ "status=%d\n", handle, status)
- return status;
+exit:
+ pthread_mutex_unlock(&MessageQ_module->gate);
+
+ return (status);
}
-/* Function to initialize the parameters for the MessageQ instance. */
-Void MessageQ_Params_init (MessageQ_Params * params)
+/*
+ * ======== MessageQ_Params_init ========
+ * Legacy implementation.
+ */
+Void MessageQ_Params_init(MessageQ_Params *params)
{
- memcpy (params, &(MessageQ_module->defaultInstParams),
- sizeof (MessageQ_Params));
+ ((MessageQ_Params_Legacy *)params)->synchronizer = NULL;
+}
- return;
+/*
+ * ======== MessageQ_Params_init__S ========
+ * New implementation which is version aware.
+ */
+Void MessageQ_Params_init__S(MessageQ_Params *params, Int version)
+{
+ MessageQ_Params_Version2 *params2;
+
+ switch (version) {
+
+ case MessageQ_Params_VERSION_2:
+ params2 = (MessageQ_Params_Version2 *)params;
+ params2->__version = MessageQ_Params_VERSION_2;
+ params2->synchronizer = NULL;
+ params2->queueIndex = MessageQ_ANY;
+ break;
+
+ default:
+ assert(FALSE);
+ break;
+ }
}
/*
- * Function to create a MessageQ object for receiving.
- *
- * Create a socket and bind the source address (local ProcId/MessageQ ID) in
- * order to get messages dispatched to this messageQ.
+ * ======== MessageQ_create ========
*/
-MessageQ_Handle MessageQ_create (String name, const MessageQ_Params * params)
+MessageQ_Handle MessageQ_create(String name, const MessageQ_Params *pp)
{
Int status;
- MessageQ_Object * obj = NULL;
- UInt16 queueIndex = 0u;
- UInt16 procId;
- UInt16 rprocId;
+ MessageQ_Object *obj = NULL;
+ IMessageQTransport_Handle transport;
+ INetworkTransport_Handle netTrans;
+ ITransport_Handle baseTrans;
+ UInt16 queueIndex;
+ UInt16 clusterId;
+ Int tid;
+ Int priority;
LAD_ClientHandle handle;
struct LAD_CommandObj cmd;
union LAD_ResponseObj rsp;
+ MessageQ_Params ps;
+
+ MessageQ_Params_init__S(&ps, MessageQ_Params_VERSION);
+
+ /* copy the given params into the current params structure */
+ if (pp != NULL) {
+
+ /* snoop the params pointer to see if it's a legacy structure */
+ if ((pp->__version == 0) || (pp->__version > 100)) {
+ ps.synchronizer = ((MessageQ_Params_Legacy *)pp)->synchronizer;
+ }
+
+ /* not legacy structure, use params version field */
+ else if (pp->__version == MessageQ_Params_VERSION_2) {
+ ps.__version = ((MessageQ_Params_Version2 *)pp)->__version;
+ ps.synchronizer = ((MessageQ_Params_Version2 *)pp)->synchronizer;
+ ps.queueIndex = ((MessageQ_Params_Version2 *)pp)->queueIndex;
+ }
+ else {
+ assert(FALSE);
+ }
+ }
handle = LAD_findHandle();
if (handle == LAD_MAXNUMCLIENTS) {
cmd.cmd = LAD_MESSAGEQ_CREATE;
cmd.clientId = handle;
+
if (name == NULL) {
cmd.args.messageQCreate.name[0] = '\0';
}
cmd.args.messageQCreate.name[LAD_MESSAGEQCREATEMAXNAMELEN - 1] = '\0';
}
- if (params) {
- memcpy(&cmd.args.messageQCreate.params, params, sizeof(*params));
- }
+ memcpy(&cmd.args.messageQCreate.params, &ps, sizeof(ps));
if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
PRINTVERBOSE1(
/* Create the generic obj */
obj = (MessageQ_Object *)calloc(1, sizeof (MessageQ_Object));
- if (params != NULL) {
- /* Populate the params member */
- memcpy((Ptr) &obj->params, (Ptr)params, sizeof (MessageQ_Params));
- }
+ /* Populate the params member */
+ memcpy(&obj->params, &ps, sizeof(ps));
+
- procId = MultiProc_self();
- queueIndex = (MessageQ_QueueIndex)rsp.messageQCreate.queueId;
obj->queue = rsp.messageQCreate.queueId;
obj->serverHandle = rsp.messageQCreate.serverHandle;
+ CIRCLEQ_INIT(&obj->msgList);
+ if (sem_init(&obj->synchronizer, 0, 0) < 0) {
+ PRINTVERBOSE1(
+ "MessageQ_create: failed to create synchronizer (errno %d)\n", errno)
- /*
- * Create a set of communication endpoints (one per each remote proc),
- * and return the socket as target for MessageQ_put() calls, and as
- * a file descriptor to close during MessageQ_delete().
- */
- for (rprocId = 0; rprocId < MultiProc_getNumProcessors(); rprocId++) {
- obj->fd[rprocId] = Transport_INVALIDSOCKET;
- if (procId == rprocId) {
- /* Skip creating an endpoint for ourself. */
- continue;
- }
-
- PRINTVERBOSE3("MessageQ_create: creating endpoint for: %s, rprocId: %d, queueIndex: %d\n", name, rprocId, queueIndex)
+ MessageQ_delete((MessageQ_Handle *)&obj);
- status = transportCreateEndpoint(&obj->fd[rprocId], rprocId,
- queueIndex);
- if (status < 0) {
- obj->fd[rprocId] = Transport_INVALIDSOCKET;
- }
+ return NULL;
}
- /*
- * Now, to support MessageQ_unblock() functionality, create an event object.
- * Writing to this event will unblock the select() call in MessageQ_get().
- */
- obj->unblockFd = eventfd(0, 0);
- if (obj->unblockFd == -1) {
- printf ("MessageQ_create: eventfd creation failed: %d, %s\n",
- errno, strerror(errno));
- MessageQ_delete((MessageQ_Handle *)&obj);
- }
- else {
- int endpointFound = 0;
+ /* lad returns the queue port # (queueIndex + PORT_OFFSET) */
+ queueIndex = MessageQ_getQueueIndex(rsp.messageQCreate.queueId);
+
+ PRINTVERBOSE2("MessageQ_create: creating endpoints for '%s' "
+ "queueIndex %d\n", (name == NULL) ? "NULL" : name , queueIndex)
- for (rprocId = 0; rprocId < MultiProc_getNumProcessors(); rprocId++) {
- if (obj->fd[rprocId] != Transport_INVALIDSOCKET) {
- endpointFound = 1;
+ for (clusterId = 0; clusterId < MultiProc_MAXPROCESSORS; clusterId++) {
+ for (priority = 0; priority < 2; priority++) {
+ transport = MessageQ_module->transports[clusterId][priority];
+ if (transport) {
+ /* need to check return and do something if error */
+ IMessageQTransport_bind((Void *)transport, obj->queue);
}
}
- if (!endpointFound) {
- printf("MessageQ_create: no transport endpoints found, deleting\n");
- MessageQ_delete((MessageQ_Handle *)&obj);
+ }
+
+ for (tid = 1; tid < MessageQ_MAXTRANSPORTS; tid++) {
+ baseTrans = MessageQ_module->transInst[tid];
+
+ if (baseTrans != NULL) {
+ switch (ITransport_itype(baseTrans)) {
+ case INetworkTransport_TypeId:
+ netTrans = INetworkTransport_downCast(baseTrans);
+ INetworkTransport_bind((void *)netTrans, obj->queue);
+ break;
+
+ default:
+ /* error */
+ printf("MessageQ_create: Error: transport id %d is an "
+ "unsupported transport type.\n", tid);
+ break;
+ }
}
}
- return ((MessageQ_Handle) obj);
+ /* LAD's MessageQ module can grow, we need to grow as well */
+ if (queueIndex >= MessageQ_module->numQueues) {
+ _MessageQ_grow(queueIndex);
+ }
+
+ /* No need to "allocate" slot since the queueIndex returned by
+ * LAD is guaranteed to be unique.
+ */
+ MessageQ_module->queues[queueIndex] = (MessageQ_Handle)obj;
+
+ return (MessageQ_Handle)obj;
}
/*
- * Function to delete a MessageQ object for a specific slave processor.
- *
- * Deletes the socket associated with this MessageQ object.
+ * ======== MessageQ_delete ========
*/
-Int MessageQ_delete (MessageQ_Handle * handlePtr)
+Int MessageQ_delete(MessageQ_Handle *handlePtr)
{
- Int status = MessageQ_S_SUCCESS;
- MessageQ_Object * obj = NULL;
- UInt16 rprocId;
- LAD_ClientHandle handle;
+ MessageQ_Object *obj;
+ IMessageQTransport_Handle transport;
+ INetworkTransport_Handle netTrans;
+ ITransport_Handle baseTrans;
+ Int status = MessageQ_S_SUCCESS;
+ UInt16 queueIndex;
+ UInt16 clusterId;
+ Int tid;
+ Int priority;
+ LAD_ClientHandle handle;
struct LAD_CommandObj cmd;
union LAD_ResponseObj rsp;
return MessageQ_E_FAIL;
}
- obj = (MessageQ_Object *) (*handlePtr);
+ obj = (MessageQ_Object *)(*handlePtr);
cmd.cmd = LAD_MESSAGEQ_DELETE;
cmd.clientId = handle;
"MessageQ_delete: got LAD response for client %d, status=%d\n",
handle, status)
+ for (clusterId = 0; clusterId < MultiProc_MAXPROCESSORS; clusterId++) {
+ for (priority = 0; priority < 2; priority++) {
+ transport = MessageQ_module->transports[clusterId][priority];
+ if (transport) {
+ IMessageQTransport_unbind((Void *)transport, obj->queue);
+ }
+ }
+ }
- /* Close the event used for MessageQ_unblock(): */
- close(obj->unblockFd);
-
- /* Close the communication endpoint: */
- for (rprocId = 0; rprocId < MultiProc_getNumProcessors(); rprocId++) {
- if (obj->fd[rprocId] != Transport_INVALIDSOCKET) {
- status = transportCloseEndpoint(obj->fd[rprocId]);
+ for (tid = 1; tid < MessageQ_MAXTRANSPORTS; tid++) {
+ baseTrans = MessageQ_module->transInst[tid];
+
+ if (baseTrans != NULL) {
+ switch (ITransport_itype(baseTrans)) {
+ case INetworkTransport_TypeId:
+ netTrans = INetworkTransport_downCast(baseTrans);
+ INetworkTransport_unbind((void *)netTrans, obj->queue);
+ break;
+
+ default:
+ /* error */
+ printf("MessageQ_create: Error: transport id %d is an "
+ "unsupported transport type.\n", tid);
+ break;
+ }
}
}
- /* Now free the obj */
- free (obj);
+ /* extract the queue index from the queueId */
+ queueIndex = MessageQ_getQueueIndex(obj->queue);
+ MessageQ_module->queues[queueIndex] = NULL;
+
+ free(obj);
*handlePtr = NULL;
- return (status);
+ return status;
}
/*
- * Opens an instance of MessageQ for sending.
- *
- * We need not create a socket here; the sockets for all remote processors
- * were created during MessageQ_attach(), and will be
- * retrieved during MessageQ_put().
+ * ======== MessageQ_open ========
+ * Acquire a queueId for use in sending messages to the queue
*/
-Int MessageQ_open (String name, MessageQ_QueueId * queueId)
+Int MessageQ_open(String name, MessageQ_QueueId *queueId)
{
Int status = MessageQ_S_SUCCESS;
- status = NameServer_getUInt32 (MessageQ_module->nameServer,
- name, queueId, NULL);
+ status = NameServer_getUInt32(MessageQ_module->nameServer,
+ name, queueId, NULL);
if (status == NameServer_E_NOTFOUND) {
- /* Set return queue ID to invalid. */
+ /* Set return queue ID to invalid */
*queueId = MessageQ_INVALIDMESSAGEQ;
status = MessageQ_E_NOTFOUND;
}
else if (status >= 0) {
- /* Override with a MessageQ status code. */
+ /* Override with a MessageQ status code */
status = MessageQ_S_SUCCESS;
}
else {
- /* Set return queue ID to invalid. */
+ /* Set return queue ID to invalid */
*queueId = MessageQ_INVALIDMESSAGEQ;
- /* Override with a MessageQ status code. */
+
+ /* Override with a MessageQ status code */
if (status == NameServer_E_TIMEOUT) {
status = MessageQ_E_TIMEOUT;
}
}
}
- return (status);
+ return status;
+}
+
+/*
+ * ======== MessageQ_openQueueId ========
+ */
+MessageQ_QueueId MessageQ_openQueueId(UInt16 queueIndex, UInt16 procId)
+{
+ MessageQ_QueueIndex queuePort;
+ MessageQ_QueueId queueId;
+
+ /* queue port is embedded in the queueId */
+ queuePort = queueIndex + MessageQ_PORTOFFSET;
+ queueId = ((MessageQ_QueueId)(procId) << 16) | queuePort;
+
+ return (queueId);
}
-/* Closes previously opened instance of MessageQ module. */
-Int MessageQ_close (MessageQ_QueueId * queueId)
+/*
+ * ======== MessageQ_close ========
+ * Closes previously opened instance of MessageQ
+ */
+Int MessageQ_close(MessageQ_QueueId *queueId)
{
Int32 status = MessageQ_S_SUCCESS;
/* Nothing more to be done for closing the MessageQ. */
*queueId = MessageQ_INVALIDMESSAGEQ;
- return (status);
+ return status;
}
/*
- * Place a message onto a message queue.
- *
- * Calls TransportShm_put(), which handles the sending of the message using the
- * appropriate kernel interface (socket, device ioctl) call for the remote
- * procId encoded in the queueId argument.
+ * ======== MessageQ_put ========
+ * Deliver the given message, either locally or to the transport
*
+ * If the destination is a local queue, deliver the message. Otherwise,
+ * pass the message to a transport for delivery. The transport handles
+ * the sending of the message using the appropriate interface (socket,
+ * device ioctl, etc.).
*/
-Int MessageQ_put (MessageQ_QueueId queueId, MessageQ_Msg msg)
+Int MessageQ_put(MessageQ_QueueId queueId, MessageQ_Msg msg)
{
- Int status;
- UInt16 dstProcId = (UInt16)(queueId >> 16);
- UInt16 queueIndex = (MessageQ_QueueIndex)(queueId & 0x0000ffff);
+ Int status = MessageQ_S_SUCCESS;
+ MessageQ_Object *obj;
+ UInt16 dstProcId;
+ UInt16 queueIndex;
+ UInt16 queuePort;
+ ITransport_Handle baseTrans;
+ IMessageQTransport_Handle msgTrans;
+ INetworkTransport_Handle netTrans;
+ Int priority;
+ UInt tid;
+ UInt16 clusterId;
+ Bool delivered;
+
+ /* extract destination address from the given queueId */
+ dstProcId = (UInt16)(queueId >> 16);
+ queuePort = (MessageQ_QueueIndex)(queueId & 0x0000ffff);
+
+ /* write the destination address into the message header */
+ msg->dstId = queuePort;
+ msg->dstProc= dstProcId;
+
+ /* invoke the hook function after addressing the message */
+ if (MessageQ_module->putHookFxn != NULL) {
+ MessageQ_module->putHookFxn(queueId, msg);
+ }
+
+ /* For an outbound message: If message destination is on this
+ * processor, then check if the destination queue is in this
+ * process (thread-to-thread messaging).
+ *
+ * For an inbound message: Check if destination queue is in this
+ * process (process-to-process messaging).
+ */
+ if (dstProcId == MultiProc_self()) {
+ queueIndex = queuePort - MessageQ_PORTOFFSET;
+
+ if (queueIndex < MessageQ_module->numQueues) {
+ obj = (MessageQ_Object *)MessageQ_module->queues[queueIndex];
+
+ if (obj != NULL) {
+ /* deliver message to queue */
+ pthread_mutex_lock(&MessageQ_module->gate);
+ CIRCLEQ_INSERT_TAIL(&obj->msgList,
+ (MessageQ_CIRCLEQ_ENTRY *)msg, elem);
+ pthread_mutex_unlock(&MessageQ_module->gate);
+ sem_post(&obj->synchronizer);
+ goto done;
+ }
+ }
+ }
+
+ /* Getting here implies the message is outbound. Must give it to
+ * either the primary or secondary transport for delivery. Start
+ * by extracting the transport ID from the message header.
+ */
+ tid = MessageQ_getTransportId(msg);
+
+ if (tid >= MessageQ_MAXTRANSPORTS) {
+ printf("MessageQ_put: Error: transport id %d too big, must be < %d\n",
+ tid, MessageQ_MAXTRANSPORTS);
+ status = MessageQ_E_FAIL;
+ goto done;
+ }
- msg->dstId = queueIndex;
- msg->dstProc = dstProcId;
+ /* if transportId is set, use secondary transport for message delivery */
+ if (tid != 0) {
+ baseTrans = MessageQ_module->transInst[tid];
- status = transportPut(msg, queueIndex, dstProcId);
+ if (baseTrans == NULL) {
+ printf("MessageQ_put: Error: transport is null\n");
+ status = MessageQ_E_FAIL;
+ goto done;
+ }
+ /* downcast instance pointer to transport interface */
+ switch (ITransport_itype(baseTrans)) {
+ case INetworkTransport_TypeId:
+ netTrans = INetworkTransport_downCast(baseTrans);
+ delivered = INetworkTransport_put(netTrans, (Ptr)msg);
+ status = (delivered ? MessageQ_S_SUCCESS : MessageQ_E_FAIL);
+ break;
+
+ default:
+ /* error */
+ printf("MessageQ_put: Error: transport id %d is an "
+ "unsupported transport type\n", tid);
+ status = MessageQ_E_FAIL;
+ break;
+ }
+ }
+ else {
+ /* use primary transport for delivery */
+ priority = MessageQ_getMsgPri(msg);
+ clusterId = dstProcId - MultiProc_getBaseIdOfCluster();
+
+ /* primary transport can only be used for intra-cluster delivery */
+ if (clusterId > MultiProc_getNumProcsInCluster()) {
+ printf("MessageQ_put: Error: destination procId=%d is not "
+ "in cluster. Must specify a transportId.\n", dstProcId);
+ status = MessageQ_E_FAIL;
+ goto done;
+ }
+
+ msgTrans = MessageQ_module->transports[clusterId][priority];
+ delivered = IMessageQTransport_put(msgTrans, (Ptr)msg);
+ status = (delivered ? MessageQ_S_SUCCESS : MessageQ_E_FAIL);
+ }
+
+done:
return (status);
}
/*
- * Gets a message for a message queue and blocks if the queue is empty.
- * If a message is present, it returns it. Otherwise it blocks
- * waiting for a message to arrive.
- * When a message is returned, it is owned by the caller.
- *
- * We block using select() on the receiving socket's file descriptor, then
- * get the waiting message via the socket API recvfrom().
- * We use the socket stored in the messageQ object via a previous call to
- * MessageQ_create().
+ * MessageQ_get - gets a message for a message queue and blocks if
+ * the queue is empty.
*
+ * If a message is present, it returns it. Otherwise it blocks
+ * waiting for a message to arrive.
+ * When a message is returned, it is owned by the caller.
*/
-Int MessageQ_get (MessageQ_Handle handle, MessageQ_Msg * msg ,UInt timeout)
+Int MessageQ_get(MessageQ_Handle handle, MessageQ_Msg *msg, UInt timeout)
{
- static int last = 0;
+ MessageQ_Object * obj = (MessageQ_Object *)handle;
Int status = MessageQ_S_SUCCESS;
- Int tmpStatus;
- MessageQ_Object * obj = (MessageQ_Object *) handle;
- int retval;
- int nfds;
- fd_set rfds;
- struct timeval tv;
- void *timevalPtr;
- UInt16 rprocId;
- int maxfd = 0;
- int selfId;
- int nProcessors;
-
- /* Wait (with timeout) and retreive message from socket: */
- FD_ZERO(&rfds);
- for (rprocId = 0; rprocId < MultiProc_getNumProcessors(); rprocId++) {
- if (rprocId == MultiProc_self() ||
- obj->fd[rprocId] == Transport_INVALIDSOCKET) {
- continue;
- }
- maxfd = MAX(maxfd, obj->fd[rprocId]);
- FD_SET(obj->fd[rprocId], &rfds);
- }
+ struct timespec ts;
+ struct timeval tv;
+
+#if 0
+/*
+ * Optimization here to get a message without going in to the sem
+ * operation, but the sem count will not be maintained properly.
+ */
+ pthread_mutex_lock(&MessageQ_module->gate);
- /* Wait also on the event fd, which may be written by MessageQ_unblock(): */
- FD_SET(obj->unblockFd, &rfds);
+ if (obj->msgList.cqh_first != &obj->msgList) {
+ *msg = (MessageQ_Msg)obj->msglist.cqh_first;
+ CIRCLEQ_REMOVE(&obj->msgList, *msg, reserved0);
- if (timeout == MessageQ_FOREVER) {
- timevalPtr = NULL;
+ pthread_mutex_unlock(&MessageQ_module->gate);
}
else {
- /* Timeout given in msec: convert: */
- tv.tv_sec = timeout / 1000;
- tv.tv_usec = (timeout % 1000) * 1000;
- timevalPtr = &tv;
+ pthread_mutex_unlock(&MessageQ_module->gate);
}
- /* Add one to last fd created: */
- nfds = MAX(maxfd, obj->unblockFd) + 1;
-
- retval = select(nfds, &rfds, NULL, NULL, timevalPtr);
- if (retval) {
- if (FD_ISSET(obj->unblockFd, &rfds)) {
- /*
- * Our event was signalled by MessageQ_unblock().
- *
- * This is typically done during a shutdown sequence, where
- * the intention of the client would be to ignore (i.e. not fetch)
- * any pending messages in the transport's queue.
- * Thus, we shall not check for nor return any messages.
- */
- *msg = NULL;
- status = MessageQ_E_UNBLOCKED;
- }
- else {
- /* start where we last left off */
- rprocId = last;
-
- selfId = MultiProc_self();
- nProcessors = MultiProc_getNumProcessors();
-
- do {
- if (rprocId != selfId &&
- obj->fd[rprocId] != Transport_INVALIDSOCKET) {
-
- if (FD_ISSET(obj->fd[rprocId], &rfds)) {
- /* Our transport's fd was signalled: Get the message */
- tmpStatus = transportGet(obj->fd[rprocId], msg);
- if (tmpStatus < 0) {
- printf ("MessageQ_get: tranposrtshm_get failed.");
- status = MessageQ_E_FAIL;
- }
-
- last = (rprocId + 1) % nProcessors;
- break;
- }
- }
- rprocId = (rprocId + 1) % nProcessors;
- } while (rprocId != last);
+#endif
+
+ if (timeout == MessageQ_FOREVER) {
+ sem_wait(&obj->synchronizer);
+ }
+ else {
+ gettimeofday(&tv, NULL);
+ ts.tv_sec = tv.tv_sec;
+ ts.tv_nsec = (tv.tv_usec + timeout) * 1000;
+
+ if (sem_timedwait(&obj->synchronizer, &ts) < 0) {
+ if (errno == ETIMEDOUT) {
+ PRINTVERBOSE0("MessageQ_get: operation timed out\n")
+
+ return MessageQ_E_TIMEOUT;
+ }
}
}
- else if (retval == 0) {
- *msg = NULL;
- status = MessageQ_E_TIMEOUT;
+
+ if (obj->unblocked) {
+ return MessageQ_E_UNBLOCKED;
}
- return (status);
+ pthread_mutex_lock(&MessageQ_module->gate);
+
+ *msg = (MessageQ_Msg)obj->msgList.cqh_first;
+ CIRCLEQ_REMOVE(&obj->msgList, (MessageQ_CIRCLEQ_ENTRY *)*msg, elem);
+
+ pthread_mutex_unlock(&MessageQ_module->gate);
+
+ return status;
}
/*
*
* TBD: Implement as a socket ioctl, using getsockopt(). Return -1 for now.
*/
-Int MessageQ_count (MessageQ_Handle handle)
+Int MessageQ_count(MessageQ_Handle handle)
{
Int count = -1;
#if 0
&count, &optlen);
#endif
- return (count);
+ return count;
}
-/* Initializes a message not obtained from MessageQ_alloc. */
-Void MessageQ_staticMsgInit (MessageQ_Msg msg, UInt32 size)
+/*
+ * Initializes a message not obtained from MessageQ_alloc.
+ */
+Void MessageQ_staticMsgInit(MessageQ_Msg msg, UInt32 size)
{
/* Fill in the fields of the message */
- MessageQ_msgInit (msg);
- msg->heapId = MessageQ_STATICMSG;
+ MessageQ_msgInit(msg);
+ msg->heapId = MessageQ_STATICMSG;
msg->msgSize = size;
}
/*
- * Allocate a message and initialize the needed fields (note some
- * of the fields in the header are set via other APIs or in the
- * MessageQ_put function,
+ * Allocate a message and initialize the needed fields (note some
+ * of the fields in the header are set via other APIs or in the
+ * MessageQ_put function,
*/
-MessageQ_Msg MessageQ_alloc (UInt16 heapId, UInt32 size)
+MessageQ_Msg MessageQ_alloc(UInt16 heapId, UInt32 size)
{
- MessageQ_Msg msg = NULL;
+ MessageQ_Msg msg;
/*
* heapId not used for local alloc (as this is over a copy transport), but
- * we need to send to other side as heapId is used in BIOS transport:
+ * we need to send to other side as heapId is used in BIOS transport.
*/
- msg = (MessageQ_Msg)calloc (1, size);
- MessageQ_msgInit (msg);
+ msg = (MessageQ_Msg)calloc(1, size);
+ MessageQ_msgInit(msg);
msg->msgSize = size;
- msg->heapId = heapId;
+ msg->heapId = heapId;
return msg;
}
-/* Frees the message back to the heap that was used to allocate it. */
-Int MessageQ_free (MessageQ_Msg msg)
+/*
+ * Frees the message back to the heap that was used to allocate it.
+ */
+Int MessageQ_free(MessageQ_Msg msg)
{
- UInt32 status = MessageQ_S_SUCCESS;
+ UInt32 status = MessageQ_S_SUCCESS;
/* Check to ensure this was not allocated by user: */
- if (msg->heapId == MessageQ_STATICMSG) {
- status = MessageQ_E_CANNOTFREESTATICMSG;
+ if (msg->heapId == MessageQ_STATICMSG) {
+ status = MessageQ_E_CANNOTFREESTATICMSG;
}
else {
- free (msg);
+ free(msg);
}
return status;
}
/* Register a heap with MessageQ. */
-Int MessageQ_registerHeap (Ptr heap, UInt16 heapId)
+Int MessageQ_registerHeap(Ptr heap, UInt16 heapId)
{
- Int status = MessageQ_S_SUCCESS;
+ Int status = MessageQ_S_SUCCESS;
- /* Do nothing, as this uses a copy transport: */
+ /* Do nothing, as this uses a copy transport */
return status;
}
/* Unregister a heap with MessageQ. */
-Int MessageQ_unregisterHeap (UInt16 heapId)
+Int MessageQ_unregisterHeap(UInt16 heapId)
{
- Int status = MessageQ_S_SUCCESS;
+ Int status = MessageQ_S_SUCCESS;
- /* Do nothing, as this uses a copy transport: */
+ /* Do nothing, as this uses a copy transport */
return status;
}
/* Unblocks a MessageQ */
-Void MessageQ_unblock (MessageQ_Handle handle)
+Void MessageQ_unblock(MessageQ_Handle handle)
{
- MessageQ_Object * obj = (MessageQ_Object *) handle;
- uint64_t buf = 1;
- int numBytes;
+ MessageQ_Object *obj = (MessageQ_Object *)handle;
- /* Write 8 bytes to awaken any threads blocked on this messageQ: */
- numBytes = write(obj->unblockFd, &buf, sizeof(buf));
+ obj->unblocked = TRUE;
+ sem_post(&obj->synchronizer);
}
-/* Embeds a source message queue into a message. */
-Void MessageQ_setReplyQueue (MessageQ_Handle handle, MessageQ_Msg msg)
+/* Embeds a source message queue into a message */
+Void MessageQ_setReplyQueue(MessageQ_Handle handle, MessageQ_Msg msg)
{
- MessageQ_Object * obj = (MessageQ_Object *) handle;
+ MessageQ_Object *obj = (MessageQ_Object *)handle;
- msg->replyId = (UInt16)(obj->queue);
+ msg->replyId = (UInt16)(obj->queue);
msg->replyProc = (UInt16)(obj->queue >> 16);
}
/* Returns the QueueId associated with the handle. */
-MessageQ_QueueId MessageQ_getQueueId (MessageQ_Handle handle)
+MessageQ_QueueId MessageQ_getQueueId(MessageQ_Handle handle)
{
- MessageQ_Object * obj = (MessageQ_Object *) handle;
- UInt32 queueId;
+ MessageQ_Object *obj = (MessageQ_Object *) handle;
+ UInt32 queueId;
queueId = (obj->queue);
}
/* Sets the tracing of a message */
-Void MessageQ_setMsgTrace (MessageQ_Msg msg, Bool traceFlag)
+Void MessageQ_setMsgTrace(MessageQ_Msg msg, Bool traceFlag)
{
msg->flags = (msg->flags & ~TRACEMASK) | (traceFlag << TRACESHIFT);
}
* The MessageQ module itself does not use any shared memory but the
* underlying transport may use some shared memory.
*/
-SizeT MessageQ_sharedMemReq (Ptr sharedAddr)
+SizeT MessageQ_sharedMemReq(Ptr sharedAddr)
{
SizeT memReq = 0u;
/* Do nothing, as this is a copy transport. */
- return (memReq);
-}
-
-/*
- * Create a socket for this remote proc, and attempt to connect.
- *
- * Only creates a socket if one does not already exist for this procId.
- *
- * Note: remoteProcId may be MultiProc_Self() for loopback case.
- */
-Int MessageQ_attach (UInt16 remoteProcId, Ptr sharedAddr)
-{
- Int status = MessageQ_S_SUCCESS;
- int sock;
-
- PRINTVERBOSE1("MessageQ_attach: remoteProcId: %d\n", remoteProcId)
-
- if (remoteProcId >= MultiProc_MAXPROCESSORS) {
- status = MessageQ_E_INVALIDPROCID;
- goto exit;
- }
-
- pthread_mutex_lock (&(MessageQ_module->gate));
-
- /* Only create a socket if one doesn't exist: */
- if (MessageQ_module->sock[remoteProcId] == Transport_INVALIDSOCKET) {
- /* Create the socket for sending messages to the remote proc: */
- sock = socket(AF_RPMSG, SOCK_SEQPACKET, 0);
- if (sock < 0) {
- status = MessageQ_E_FAIL;
- printf ("MessageQ_attach: socket failed: %d, %s\n",
- errno, strerror(errno));
- }
- else {
- PRINTVERBOSE1("MessageQ_attach: created send socket: %d\n", sock)
- MessageQ_module->sock[remoteProcId] = sock;
- /* Attempt to connect: */
- status = ConnectSocket(sock, remoteProcId, MESSAGEQ_RPMSG_PORT);
- if (status < 0) {
- status = MessageQ_E_RESOURCE;
- /* don't hard-printf since this is no longer fatal */
- PRINTVERBOSE1("MessageQ_attach: ConnectSocket(remoteProcId:%d) failed\n",
- remoteProcId);
- }
- }
- }
- else {
- status = MessageQ_E_ALREADYEXISTS;
- }
-
- pthread_mutex_unlock (&(MessageQ_module->gate));
-
- if (status == MessageQ_E_RESOURCE) {
- MessageQ_detach(remoteProcId);
- }
-
-exit:
- return (status);
-}
-
-/*
- * Close the socket for this remote proc.
- *
- */
-Int MessageQ_detach (UInt16 remoteProcId)
-{
- Int status = MessageQ_S_SUCCESS;
- int sock;
-
- if (remoteProcId >= MultiProc_MAXPROCESSORS) {
- status = MessageQ_E_INVALIDPROCID;
- goto exit;
- }
-
- pthread_mutex_lock (&(MessageQ_module->gate));
-
- sock = MessageQ_module->sock[remoteProcId];
- if (sock != Transport_INVALIDSOCKET) {
- if (close(sock)) {
- status = MessageQ_E_OSFAILURE;
- printf("MessageQ_detach: close failed: %d, %s\n",
- errno, strerror(errno));
- }
- else {
- PRINTVERBOSE1("MessageQ_detach: closed socket: %d\n", sock)
- MessageQ_module->sock[remoteProcId] = Transport_INVALIDSOCKET;
- }
- }
-
- pthread_mutex_unlock (&(MessageQ_module->gate));
-
-exit:
- return (status);
+ return memReq;
}
/*
* This is a helper function to initialize a message.
*/
-Void MessageQ_msgInit (MessageQ_Msg msg)
+Void MessageQ_msgInit(MessageQ_Msg msg)
{
#if 0
Int status = MessageQ_S_SUCCESS;
"MessageQ_msgInit: got LAD response for client %d, status=%d\n",
handle, status)
- memcpy(msg, &rsp.msgInit.msg, sizeof(*msg));
+ memcpy(msg, &rsp.msgInit.msg, sizeof (*msg));
#else
msg->reserved0 = 0; /* We set this to distinguish from NameServerMsg */
msg->replyId = (UInt16)MessageQ_INVALIDMESSAGEQ;
msg->flags = MessageQ_HEADERVERSION | MessageQ_NORMALPRI;
msg->srcProc = MultiProc_self();
- pthread_mutex_lock(&(MessageQ_module->gate));
+ pthread_mutex_lock(&MessageQ_module->gate);
msg->seqNum = MessageQ_module->seqNum++;
- pthread_mutex_unlock(&(MessageQ_module->gate));
+ pthread_mutex_unlock(&MessageQ_module->gate);
#endif
}
/*
- * =============================================================================
- * Transport: Fxns kept here until need for a transport layer is realized.
- * =============================================================================
- */
-/*
- * ======== transportCreateEndpoint ========
+ * ======== _MessageQ_grow ========
+ * Increase module's queues array to accommodate queueIndex from LAD
*
- * Create a communication endpoint to receive messages.
+ * Note: this function takes the queue index value (i.e. without the
+ * port offset).
*/
-static Int transportCreateEndpoint(int * fd, UInt16 rprocId, UInt16 queueIndex)
+Void _MessageQ_grow(UInt16 queueIndex)
{
- Int status = MessageQ_S_SUCCESS;
- int err;
-
- /* Create the socket to receive messages for this messageQ. */
- *fd = socket(AF_RPMSG, SOCK_SEQPACKET, 0);
- if (*fd < 0) {
- status = MessageQ_E_FAIL;
- printf ("transportCreateEndpoint: socket call failed: %d, %s\n",
- errno, strerror(errno));
- goto exit;
- }
-
- PRINTVERBOSE1("transportCreateEndpoint: created socket: fd: %d\n", *fd)
-
- err = SocketBindAddr(*fd, rprocId, (UInt32)queueIndex);
- if (err < 0) {
- status = MessageQ_E_FAIL;
- /* don't hard-printf since this is no longer fatal */
- PRINTVERBOSE2("transportCreateEndpoint: bind failed: %d, %s\n",
- errno, strerror(errno));
- close(*fd);
- }
+ MessageQ_Handle *queues;
+ MessageQ_Handle *oldQueues;
+ UInt oldSize;
-exit:
- return (status);
-}
+ oldSize = MessageQ_module->numQueues * sizeof (MessageQ_Handle);
-/*
- * ======== transportCloseEndpoint ========
- *
- * Close the communication endpoint.
- */
-static Int transportCloseEndpoint(int fd)
-{
- Int status = MessageQ_S_SUCCESS;
+ queues = calloc(queueIndex + MessageQ_GROWSIZE, sizeof(MessageQ_Handle));
+ memcpy(queues, MessageQ_module->queues, oldSize);
- PRINTVERBOSE1("transportCloseEndpoint: closing socket: %d\n", fd)
+ oldQueues = MessageQ_module->queues;
+ MessageQ_module->queues = queues;
+ MessageQ_module->numQueues = queueIndex + MessageQ_GROWSIZE;
- /* Stop communication to this socket: */
- close(fd);
+ free(oldQueues);
- return (status);
-}
-
-/*
- * ======== transportGet ========
- * Retrieve a message waiting in the socket's queue.
-*/
-static Int transportGet(int sock, MessageQ_Msg * retMsg)
-{
- Int status = MessageQ_S_SUCCESS;
- MessageQ_Msg msg;
- struct sockaddr_rpmsg fromAddr; // [Socket address of sender]
- unsigned int len;
- int byteCount;
-
- /*
- * We have no way of peeking to see what message size we'll get, so we
- * allocate a message of max size to receive contents from the rpmsg socket
- * (currently, a copy transport)
- */
- msg = MessageQ_alloc (0, MESSAGEQ_RPMSG_MAXSIZE);
- if (!msg) {
- status = MessageQ_E_MEMORY;
- goto exit;
- }
-
- memset(&fromAddr, 0, sizeof(fromAddr));
- len = sizeof(fromAddr);
-
- byteCount = recvfrom(sock, msg, MESSAGEQ_RPMSG_MAXSIZE, 0,
- (struct sockaddr *)&fromAddr, &len);
- if (len != sizeof(fromAddr)) {
- printf("recvfrom: got bad addr len (%d)\n", len);
- status = MessageQ_E_FAIL;
- goto exit;
- }
- if (byteCount < 0) {
- printf("recvfrom failed: %s (%d)\n", strerror(errno), errno);
- status = MessageQ_E_FAIL;
- goto exit;
- }
- else {
- /* Update the allocated message size (even though this may waste space
- * when the actual message is smaller than the maximum rpmsg size,
- * the message will be freed soon anyway, and it avoids an extra copy).
- */
- msg->msgSize = byteCount;
-
- /*
- * If the message received was statically allocated, reset the
- * heapId, so the app can free it.
- */
- if (msg->heapId == MessageQ_STATICMSG) {
- msg->heapId = 0; /* for a copy transport, heap id is 0. */
- }
- }
-
- PRINTVERBOSE1("transportGet: recvfrom socket: fd: %d\n", sock)
- PRINTVERBOSE3("\tReceived a msg: byteCount: %d, rpmsg addr: %d, rpmsg proc: %d\n", byteCount, fromAddr.addr, fromAddr.vproc_id)
- PRINTVERBOSE2("\tMessage Id: %d, Message size: %d\n", msg->msgId, msg->msgSize)
-
- *retMsg = msg;
-
-exit:
- return (status);
-}
-
-/*
- * ======== transportPut ========
- *
- * Calls the socket API sendto() on the socket associated with
- * with this destination procID.
- * Currently, both local and remote messages are sent via the Socket ABI, so
- * no local object lists are maintained here.
-*/
-static Int transportPut(MessageQ_Msg msg, UInt16 dstId, UInt16 dstProcId)
-{
- Int status = MessageQ_S_SUCCESS;
- int sock;
- int err;
-
- /*
- * Retrieve the socket for the AF_SYSLINK protocol associated with this
- * transport.
- */
- sock = MessageQ_module->sock[dstProcId];
-
- PRINTVERBOSE2("Sending msgId: %d via sock: %d\n", msg->msgId, sock)
-
- err = send(sock, msg, msg->msgSize, 0);
- if (err < 0) {
- printf ("transportPut: send failed: %d, %s\n",
- errno, strerror(errno));
- status = MessageQ_E_FAIL;
- goto exit;
- }
-
- /*
- * Free the message, as this is a copy transport, we maintain MessageQ
- * semantics.
- */
- MessageQ_free (msg);
-
-exit:
- return (status);
+ return;
}
index d40cc76db8abe8be5997ca596dacd23b5e81ef88..0a8435f1d1bacf67e4406ef911fe5746ac634137 100644 (file)
/*
- * Copyright (c) 2013-2014, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * @file MultiProcQ.c
+ * @file MultiProcQ.c
*
- * @brief MultiProc Linux implementation
+ * @brief MultiProc Linux implementation
*/
/* Standard IPC header */
assert (cfg != NULL);
handle = LAD_findHandle();
- if (handle == LAD_MAXNUMCLIENTS) {
- PRINTVERBOSE1(
- "MultiProc_getConfig: can't find connection to daemon for pid %d\n",
- getpid())
- return;
+ if (handle == LAD_MAXNUMCLIENTS) {
+ PRINTVERBOSE1("MultiProc_getConfig: can't find connection to daemon "
+ "for pid %d\n", getpid())
+ return;
}
cmd.cmd = LAD_MULTIPROC_GETCONFIG;
cmd.clientId = handle;
if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
- PRINTVERBOSE1(
- "MultiProc_getConfig: sending LAD command failed, status=%d\n", status)
- return;
+ PRINTVERBOSE1("MultiProc_getConfig: sending LAD command failed, "
+ "status=%d\n", status)
+ return;
}
if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
- PRINTVERBOSE1("MultiProc_getConfig: no LAD response, status=%d\n", status)
- return;
+ PRINTVERBOSE1("MultiProc_getConfig: no LAD response, status=%d\n",
+ status)
+ return;
}
status = rsp.multiprocGetConfig.status;
- PRINTVERBOSE2(
- "MultiProc_getConfig: got LAD response for client %d, status=%d\n",
- handle, status)
+ PRINTVERBOSE2("MultiProc_getConfig: got LAD response for client %d, "
+ "status=%d\n", handle, status)
memcpy(cfg, &rsp.multiprocGetConfig.cfg, sizeof(*cfg));
index 3f8509db5c2338dad463e70e0bc858620eda3f94..1d2d8620305cd9f6953485e463032b3314e7f6bf 100644 (file)
##
-## Copyright (c) 2013-2014, Texas Instruments Incorporated
+## Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
##
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
- -I$(top_srcdir)/packages -I$(KERNEL_INSTALL_DIR)/include/generated/uapi\
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall \
+ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)"
if DRA7XX
AM_CFLAGS += -DGATEMP_SUPPORT
endif
+if KERNEL_INSTALL_DIR
+AM_CFLAGS += -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
+endif
+
+if AF_RPMSG
+AM_CFLAGS += -DAF_RPMSG=$(AF_RPMSG)
+endif
+
+AM_CFLAGS += -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages @AM_CFLAGS@
+
###############################################################################
# THE PROGRAMS TO BUILD
###############################################################################
common_sources = \
lad.c \
MessageQ_daemon.c \
+ cfg/MessageQCfg.c \
MultiProc_daemon.c \
NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
GateMP_daemon.c \
GateHWSpinlock.c \
GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
#
# NOTE: 6636_SOURCES using 6638.c is not a typo! 6636 has the same
# MultiProc config as 6638, so we reuse that source file.
-lad_omap54xx_smp_SOURCES = $(common_sources) MultiProcCfg_omap54xx_smp.c
-lad_dra7xx_SOURCES = $(common_sources) MultiProcCfg_dra7xx.c
-lad_omapl138_SOURCES = $(common_sources) MultiProcCfg_omapl138.c
-lad_66ak2e_SOURCES = $(common_sources) MultiProcCfg_66ak2e.c
-lad_tci6614_SOURCES = $(common_sources) MultiProcCfg_tci6614.c
-lad_tci6630_SOURCES = $(common_sources) MultiProcCfg_tci6630.c
-lad_tci6636_SOURCES = $(common_sources) MultiProcCfg_tci6638.c
-lad_tci6638_SOURCES = $(common_sources) MultiProcCfg_tci6638.c
+lad_omap54xx_smp_SOURCES = $(common_sources) cfg/MultiProcCfg_omap54xx_smp.c
+lad_dra7xx_SOURCES = $(common_sources) cfg/MultiProcCfg_dra7xx.c
+lad_omapl138_SOURCES = $(common_sources) cfg/MultiProcCfg_omapl138.c
+lad_66ak2e_SOURCES = $(common_sources) cfg/MultiProcCfg_66ak2e.c
+lad_tci6614_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6614.c
+lad_tci6630_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6630.c
+lad_tci6636_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
+lad_tci6638_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
common_libraries = -lpthread \
$(top_builddir)/linux/src/utils/libtiipcutils_lad.la
index 81075c94d478087ba069a11b6e460fcdfdd5e8bf..7b0c92b658ef79299cb8ca842e8844e2d59fb6f0 100644 (file)
build_triplet = @build@
host_triplet = @host@
@DRA7XX_TRUE@am__append_1 = -DGATEMP_SUPPORT
+@KERNEL_INSTALL_DIR_TRUE@am__append_2 = -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
+@AF_RPMSG_TRUE@am__append_3 = -DAF_RPMSG=$(AF_RPMSG)
bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
$(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
$(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9)
-@OMAP54XX_SMP_TRUE@am__append_2 = lad_omap54xx_smp
-@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_3 = lad_dra7xx
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_4 = lad_omapl138
-@C66AK2E_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@am__append_5 = lad_66ak2e
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_6 = lad_tci6614
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_TRUE@am__append_7 = lad_tci6630
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_TRUE@am__append_8 = lad_tci6636
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_9 = lad_tci6638
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_10 = lad_omap54xx_smp lad_dra7xx lad_omapl138 lad_66ak2e lad_tci6614 lad_tci6630 lad_tci6636 lad_tci6638
-@DRA7XX_TRUE@am__append_11 = \
+@OMAP54XX_SMP_TRUE@am__append_4 = lad_omap54xx_smp
+@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_5 = lad_dra7xx
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_6 = lad_omapl138
+@C66AK2E_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@am__append_7 = lad_66ak2e
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_8 = lad_tci6614
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_TRUE@am__append_9 = lad_tci6630
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_TRUE@am__append_10 = lad_tci6636
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_11 = lad_tci6638
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_12 = lad_omap54xx_smp lad_dra7xx lad_omapl138 lad_66ak2e lad_tci6614 lad_tci6630 lad_tci6636 lad_tci6638
+@DRA7XX_TRUE@am__append_13 = \
@DRA7XX_TRUE@ GateMP_daemon.c \
@DRA7XX_TRUE@ GateHWSpinlock.c \
@DRA7XX_TRUE@ GateHWSpinlock_daemon.c \
-@DRA7XX_TRUE@ GateHWSpinlockCfg_dra7xx.c \
+@DRA7XX_TRUE@ cfg/GateHWSpinlockCfg_dra7xx.c \
@DRA7XX_TRUE@ $(top_srcdir)/linux/src/api/gates/GateMutex.c \
@DRA7XX_TRUE@ $(top_srcdir)/linux/include/_GateMP.h \
@DRA7XX_TRUE@ $(top_srcdir)/linux/include/_GateMP_daemon.h \
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am__lad_66ak2e_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_66ak2e.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_66ak2e.c
@DRA7XX_TRUE@am__objects_1 = GateMP_daemon.$(OBJEXT) \
@DRA7XX_TRUE@ GateHWSpinlock.$(OBJEXT) \
@DRA7XX_TRUE@ GateHWSpinlock_daemon.$(OBJEXT) \
@DRA7XX_TRUE@ GateHWSpinlockCfg_dra7xx.$(OBJEXT) \
@DRA7XX_TRUE@ GateMutex.$(OBJEXT)
am__objects_2 = lad.$(OBJEXT) MessageQ_daemon.$(OBJEXT) \
- MultiProc_daemon.$(OBJEXT) NameServer_daemon.$(OBJEXT) \
- $(am__objects_1)
+ MessageQCfg.$(OBJEXT) MultiProc_daemon.$(OBJEXT) \
+ NameServer_daemon.$(OBJEXT) $(am__objects_1)
am_lad_66ak2e_OBJECTS = $(am__objects_2) MultiProcCfg_66ak2e.$(OBJEXT)
lad_66ak2e_OBJECTS = $(am_lad_66ak2e_OBJECTS)
am__DEPENDENCIES_1 = \
am__DEPENDENCIES_2 =
lad_66ak2e_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am__lad_dra7xx_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_dra7xx.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_dra7xx.c
am_lad_dra7xx_OBJECTS = $(am__objects_2) MultiProcCfg_dra7xx.$(OBJEXT)
lad_dra7xx_OBJECTS = $(am_lad_dra7xx_OBJECTS)
lad_dra7xx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am__lad_omap54xx_smp_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
$(top_srcdir)/packages/ti/ipc/GateMP.h \
- MultiProcCfg_omap54xx_smp.c
+ cfg/MultiProcCfg_omap54xx_smp.c
am_lad_omap54xx_smp_OBJECTS = $(am__objects_2) \
MultiProcCfg_omap54xx_smp.$(OBJEXT)
lad_omap54xx_smp_OBJECTS = $(am_lad_omap54xx_smp_OBJECTS)
lad_omap54xx_smp_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2)
am__lad_omapl138_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_omapl138.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_omapl138.c
am_lad_omapl138_OBJECTS = $(am__objects_2) \
MultiProcCfg_omapl138.$(OBJEXT)
lad_omapl138_OBJECTS = $(am_lad_omapl138_OBJECTS)
lad_omapl138_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2)
am__lad_tci6614_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_tci6614.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_tci6614.c
am_lad_tci6614_OBJECTS = $(am__objects_2) \
MultiProcCfg_tci6614.$(OBJEXT)
lad_tci6614_OBJECTS = $(am_lad_tci6614_OBJECTS)
lad_tci6614_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am__lad_tci6630_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_tci6630.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_tci6630.c
am_lad_tci6630_OBJECTS = $(am__objects_2) \
MultiProcCfg_tci6630.$(OBJEXT)
lad_tci6630_OBJECTS = $(am_lad_tci6630_OBJECTS)
lad_tci6630_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am__lad_tci6636_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_tci6638.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_tci6638.c
am_lad_tci6636_OBJECTS = $(am__objects_2) \
MultiProcCfg_tci6638.$(OBJEXT)
lad_tci6636_OBJECTS = $(am_lad_tci6636_OBJECTS)
lad_tci6636_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am__lad_tci6638_SOURCES_DIST = lad.c MessageQ_daemon.c \
- MultiProc_daemon.c NameServer_daemon.c \
+ cfg/MessageQCfg.c MultiProc_daemon.c NameServer_daemon.c \
$(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
$(top_srcdir)/packages/ti/ipc/MultiProc.h GateMP_daemon.c \
GateHWSpinlock.c GateHWSpinlock_daemon.c \
- GateHWSpinlockCfg_dra7xx.c \
+ cfg/GateHWSpinlockCfg_dra7xx.c \
$(top_srcdir)/linux/src/api/gates/GateMutex.c \
$(top_srcdir)/linux/include/_GateMP.h \
$(top_srcdir)/linux/include/_GateMP_daemon.h \
$(top_srcdir)/linux/include/GateHWSpinlock.h \
$(top_srcdir)/linux/include/GateMutex.h \
$(top_srcdir)/linux/include/GateMP_config.h \
- $(top_srcdir)/packages/ti/ipc/GateMP.h MultiProcCfg_tci6638.c
+ $(top_srcdir)/packages/ti/ipc/GateMP.h \
+ cfg/MultiProcCfg_tci6638.c
am_lad_tci6638_OBJECTS = $(am__objects_2) \
MultiProcCfg_tci6638.$(OBJEXT)
lad_tci6638_OBJECTS = $(am_lad_tci6638_OBJECTS)
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include \
- -I$(top_srcdir)/hlos_common/include -I$(top_srcdir)/packages \
- -I$(KERNEL_INSTALL_DIR)/include/generated/uapi -D_GNU_SOURCE \
- -Wall @AM_CFLAGS@ $(am__append_1)
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall \
+ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" $(am__append_1) \
+ $(am__append_2) $(am__append_3) -I$(top_srcdir)/linux/include \
+ -I$(top_srcdir)/packages @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-common_sources = lad.c MessageQ_daemon.c MultiProc_daemon.c \
- NameServer_daemon.c $(top_srcdir)/linux/include/ti/ipc/Std.h \
+common_sources = lad.c MessageQ_daemon.c cfg/MessageQCfg.c \
+ MultiProc_daemon.c NameServer_daemon.c \
+ $(top_srcdir)/linux/include/ti/ipc/Std.h \
$(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
$(top_srcdir)/hlos_common/include/_MessageQ.h \
$(top_srcdir)/hlos_common/include/_NameServer.h \
$(top_srcdir)/linux/include/net/rpmsg.h \
$(top_srcdir)/packages/ti/ipc/MessageQ.h \
$(top_srcdir)/packages/ti/ipc/NameServer.h \
- $(top_srcdir)/packages/ti/ipc/MultiProc.h $(am__append_11)
+ $(top_srcdir)/packages/ti/ipc/MultiProc.h $(am__append_13)
# list of sources for the 'lad' binary and to add to the source distribution
#
# NOTE: 6636_SOURCES using 6638.c is not a typo! 6636 has the same
# MultiProc config as 6638, so we reuse that source file.
-lad_omap54xx_smp_SOURCES = $(common_sources) MultiProcCfg_omap54xx_smp.c
-lad_dra7xx_SOURCES = $(common_sources) MultiProcCfg_dra7xx.c
-lad_omapl138_SOURCES = $(common_sources) MultiProcCfg_omapl138.c
-lad_66ak2e_SOURCES = $(common_sources) MultiProcCfg_66ak2e.c
-lad_tci6614_SOURCES = $(common_sources) MultiProcCfg_tci6614.c
-lad_tci6630_SOURCES = $(common_sources) MultiProcCfg_tci6630.c
-lad_tci6636_SOURCES = $(common_sources) MultiProcCfg_tci6638.c
-lad_tci6638_SOURCES = $(common_sources) MultiProcCfg_tci6638.c
+lad_omap54xx_smp_SOURCES = $(common_sources) cfg/MultiProcCfg_omap54xx_smp.c
+lad_dra7xx_SOURCES = $(common_sources) cfg/MultiProcCfg_dra7xx.c
+lad_omapl138_SOURCES = $(common_sources) cfg/MultiProcCfg_omapl138.c
+lad_66ak2e_SOURCES = $(common_sources) cfg/MultiProcCfg_66ak2e.c
+lad_tci6614_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6614.c
+lad_tci6630_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6630.c
+lad_tci6636_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
+lad_tci6638_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
common_libraries = -lpthread \
$(top_builddir)/linux/src/utils/libtiipcutils_lad.la
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GateHWSpinlock_daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GateMP_daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GateMutex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQCfg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQ_daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MultiProcCfg_66ak2e.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MultiProcCfg_dra7xx.Po@am__quote@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+MessageQCfg.o: cfg/MessageQCfg.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MessageQCfg.o -MD -MP -MF "$(DEPDIR)/MessageQCfg.Tpo" -c -o MessageQCfg.o `test -f 'cfg/MessageQCfg.c' || echo '$(srcdir)/'`cfg/MessageQCfg.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MessageQCfg.Tpo" "$(DEPDIR)/MessageQCfg.Po"; else rm -f "$(DEPDIR)/MessageQCfg.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MessageQCfg.c' object='MessageQCfg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MessageQCfg.o `test -f 'cfg/MessageQCfg.c' || echo '$(srcdir)/'`cfg/MessageQCfg.c
+
+MessageQCfg.obj: cfg/MessageQCfg.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MessageQCfg.obj -MD -MP -MF "$(DEPDIR)/MessageQCfg.Tpo" -c -o MessageQCfg.obj `if test -f 'cfg/MessageQCfg.c'; then $(CYGPATH_W) 'cfg/MessageQCfg.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MessageQCfg.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MessageQCfg.Tpo" "$(DEPDIR)/MessageQCfg.Po"; else rm -f "$(DEPDIR)/MessageQCfg.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MessageQCfg.c' object='MessageQCfg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MessageQCfg.obj `if test -f 'cfg/MessageQCfg.c'; then $(CYGPATH_W) 'cfg/MessageQCfg.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MessageQCfg.c'; fi`
+
+GateHWSpinlockCfg_dra7xx.o: cfg/GateHWSpinlockCfg_dra7xx.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT GateHWSpinlockCfg_dra7xx.o -MD -MP -MF "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo" -c -o GateHWSpinlockCfg_dra7xx.o `test -f 'cfg/GateHWSpinlockCfg_dra7xx.c' || echo '$(srcdir)/'`cfg/GateHWSpinlockCfg_dra7xx.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo" "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Po"; else rm -f "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/GateHWSpinlockCfg_dra7xx.c' object='GateHWSpinlockCfg_dra7xx.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o GateHWSpinlockCfg_dra7xx.o `test -f 'cfg/GateHWSpinlockCfg_dra7xx.c' || echo '$(srcdir)/'`cfg/GateHWSpinlockCfg_dra7xx.c
+
+GateHWSpinlockCfg_dra7xx.obj: cfg/GateHWSpinlockCfg_dra7xx.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT GateHWSpinlockCfg_dra7xx.obj -MD -MP -MF "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo" -c -o GateHWSpinlockCfg_dra7xx.obj `if test -f 'cfg/GateHWSpinlockCfg_dra7xx.c'; then $(CYGPATH_W) 'cfg/GateHWSpinlockCfg_dra7xx.c'; else $(CYGPATH_W) '$(srcdir)/cfg/GateHWSpinlockCfg_dra7xx.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo" "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Po"; else rm -f "$(DEPDIR)/GateHWSpinlockCfg_dra7xx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/GateHWSpinlockCfg_dra7xx.c' object='GateHWSpinlockCfg_dra7xx.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o GateHWSpinlockCfg_dra7xx.obj `if test -f 'cfg/GateHWSpinlockCfg_dra7xx.c'; then $(CYGPATH_W) 'cfg/GateHWSpinlockCfg_dra7xx.c'; else $(CYGPATH_W) '$(srcdir)/cfg/GateHWSpinlockCfg_dra7xx.c'; fi`
+
GateMutex.o: $(top_srcdir)/linux/src/api/gates/GateMutex.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT GateMutex.o -MD -MP -MF "$(DEPDIR)/GateMutex.Tpo" -c -o GateMutex.o `test -f '$(top_srcdir)/linux/src/api/gates/GateMutex.c' || echo '$(srcdir)/'`$(top_srcdir)/linux/src/api/gates/GateMutex.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/GateMutex.Tpo" "$(DEPDIR)/GateMutex.Po"; else rm -f "$(DEPDIR)/GateMutex.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o GateMutex.obj `if test -f '$(top_srcdir)/linux/src/api/gates/GateMutex.c'; then $(CYGPATH_W) '$(top_srcdir)/linux/src/api/gates/GateMutex.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/linux/src/api/gates/GateMutex.c'; fi`
+MultiProcCfg_66ak2e.o: cfg/MultiProcCfg_66ak2e.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_66ak2e.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo" -c -o MultiProcCfg_66ak2e.o `test -f 'cfg/MultiProcCfg_66ak2e.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_66ak2e.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo" "$(DEPDIR)/MultiProcCfg_66ak2e.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_66ak2e.c' object='MultiProcCfg_66ak2e.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_66ak2e.o `test -f 'cfg/MultiProcCfg_66ak2e.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_66ak2e.c
+
+MultiProcCfg_66ak2e.obj: cfg/MultiProcCfg_66ak2e.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_66ak2e.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo" -c -o MultiProcCfg_66ak2e.obj `if test -f 'cfg/MultiProcCfg_66ak2e.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_66ak2e.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_66ak2e.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo" "$(DEPDIR)/MultiProcCfg_66ak2e.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_66ak2e.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_66ak2e.c' object='MultiProcCfg_66ak2e.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_66ak2e.obj `if test -f 'cfg/MultiProcCfg_66ak2e.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_66ak2e.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_66ak2e.c'; fi`
+
+MultiProcCfg_dra7xx.o: cfg/MultiProcCfg_dra7xx.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_dra7xx.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo" -c -o MultiProcCfg_dra7xx.o `test -f 'cfg/MultiProcCfg_dra7xx.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_dra7xx.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo" "$(DEPDIR)/MultiProcCfg_dra7xx.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_dra7xx.c' object='MultiProcCfg_dra7xx.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_dra7xx.o `test -f 'cfg/MultiProcCfg_dra7xx.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_dra7xx.c
+
+MultiProcCfg_dra7xx.obj: cfg/MultiProcCfg_dra7xx.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_dra7xx.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo" -c -o MultiProcCfg_dra7xx.obj `if test -f 'cfg/MultiProcCfg_dra7xx.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_dra7xx.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_dra7xx.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo" "$(DEPDIR)/MultiProcCfg_dra7xx.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_dra7xx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_dra7xx.c' object='MultiProcCfg_dra7xx.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_dra7xx.obj `if test -f 'cfg/MultiProcCfg_dra7xx.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_dra7xx.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_dra7xx.c'; fi`
+
+MultiProcCfg_omap54xx_smp.o: cfg/MultiProcCfg_omap54xx_smp.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_omap54xx_smp.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo" -c -o MultiProcCfg_omap54xx_smp.o `test -f 'cfg/MultiProcCfg_omap54xx_smp.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_omap54xx_smp.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo" "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_omap54xx_smp.c' object='MultiProcCfg_omap54xx_smp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_omap54xx_smp.o `test -f 'cfg/MultiProcCfg_omap54xx_smp.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_omap54xx_smp.c
+
+MultiProcCfg_omap54xx_smp.obj: cfg/MultiProcCfg_omap54xx_smp.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_omap54xx_smp.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo" -c -o MultiProcCfg_omap54xx_smp.obj `if test -f 'cfg/MultiProcCfg_omap54xx_smp.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_omap54xx_smp.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_omap54xx_smp.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo" "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_omap54xx_smp.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_omap54xx_smp.c' object='MultiProcCfg_omap54xx_smp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_omap54xx_smp.obj `if test -f 'cfg/MultiProcCfg_omap54xx_smp.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_omap54xx_smp.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_omap54xx_smp.c'; fi`
+
+MultiProcCfg_omapl138.o: cfg/MultiProcCfg_omapl138.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_omapl138.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_omapl138.Tpo" -c -o MultiProcCfg_omapl138.o `test -f 'cfg/MultiProcCfg_omapl138.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_omapl138.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_omapl138.Tpo" "$(DEPDIR)/MultiProcCfg_omapl138.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_omapl138.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_omapl138.c' object='MultiProcCfg_omapl138.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_omapl138.o `test -f 'cfg/MultiProcCfg_omapl138.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_omapl138.c
+
+MultiProcCfg_omapl138.obj: cfg/MultiProcCfg_omapl138.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_omapl138.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_omapl138.Tpo" -c -o MultiProcCfg_omapl138.obj `if test -f 'cfg/MultiProcCfg_omapl138.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_omapl138.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_omapl138.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_omapl138.Tpo" "$(DEPDIR)/MultiProcCfg_omapl138.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_omapl138.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_omapl138.c' object='MultiProcCfg_omapl138.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_omapl138.obj `if test -f 'cfg/MultiProcCfg_omapl138.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_omapl138.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_omapl138.c'; fi`
+
+MultiProcCfg_tci6614.o: cfg/MultiProcCfg_tci6614.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6614.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6614.Tpo" -c -o MultiProcCfg_tci6614.o `test -f 'cfg/MultiProcCfg_tci6614.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6614.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6614.Tpo" "$(DEPDIR)/MultiProcCfg_tci6614.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6614.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6614.c' object='MultiProcCfg_tci6614.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6614.o `test -f 'cfg/MultiProcCfg_tci6614.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6614.c
+
+MultiProcCfg_tci6614.obj: cfg/MultiProcCfg_tci6614.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6614.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6614.Tpo" -c -o MultiProcCfg_tci6614.obj `if test -f 'cfg/MultiProcCfg_tci6614.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6614.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6614.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6614.Tpo" "$(DEPDIR)/MultiProcCfg_tci6614.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6614.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6614.c' object='MultiProcCfg_tci6614.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6614.obj `if test -f 'cfg/MultiProcCfg_tci6614.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6614.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6614.c'; fi`
+
+MultiProcCfg_tci6630.o: cfg/MultiProcCfg_tci6630.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6630.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6630.Tpo" -c -o MultiProcCfg_tci6630.o `test -f 'cfg/MultiProcCfg_tci6630.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6630.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6630.Tpo" "$(DEPDIR)/MultiProcCfg_tci6630.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6630.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6630.c' object='MultiProcCfg_tci6630.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6630.o `test -f 'cfg/MultiProcCfg_tci6630.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6630.c
+
+MultiProcCfg_tci6630.obj: cfg/MultiProcCfg_tci6630.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6630.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6630.Tpo" -c -o MultiProcCfg_tci6630.obj `if test -f 'cfg/MultiProcCfg_tci6630.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6630.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6630.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6630.Tpo" "$(DEPDIR)/MultiProcCfg_tci6630.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6630.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6630.c' object='MultiProcCfg_tci6630.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6630.obj `if test -f 'cfg/MultiProcCfg_tci6630.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6630.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6630.c'; fi`
+
+MultiProcCfg_tci6638.o: cfg/MultiProcCfg_tci6638.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6638.o -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6638.Tpo" -c -o MultiProcCfg_tci6638.o `test -f 'cfg/MultiProcCfg_tci6638.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6638.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6638.Tpo" "$(DEPDIR)/MultiProcCfg_tci6638.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6638.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6638.c' object='MultiProcCfg_tci6638.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6638.o `test -f 'cfg/MultiProcCfg_tci6638.c' || echo '$(srcdir)/'`cfg/MultiProcCfg_tci6638.c
+
+MultiProcCfg_tci6638.obj: cfg/MultiProcCfg_tci6638.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MultiProcCfg_tci6638.obj -MD -MP -MF "$(DEPDIR)/MultiProcCfg_tci6638.Tpo" -c -o MultiProcCfg_tci6638.obj `if test -f 'cfg/MultiProcCfg_tci6638.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6638.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6638.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/MultiProcCfg_tci6638.Tpo" "$(DEPDIR)/MultiProcCfg_tci6638.Po"; else rm -f "$(DEPDIR)/MultiProcCfg_tci6638.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg/MultiProcCfg_tci6638.c' object='MultiProcCfg_tci6638.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MultiProcCfg_tci6638.obj `if test -f 'cfg/MultiProcCfg_tci6638.c'; then $(CYGPATH_W) 'cfg/MultiProcCfg_tci6638.c'; else $(CYGPATH_W) '$(srcdir)/cfg/MultiProcCfg_tci6638.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
index d718f2d8249508aaaa6eb7513d40f777b325dd92..dc301c2652a6ef7ca1d213fee7b3789b9be4306c 100644 (file)
/*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
#define MessageQ_NAMESERVER "MessageQ"
-/* Slot 0 reserved for NameServer messages: */
-#define RESERVED_MSGQ_INDEX 1
+/* Number of entries to grow when we run out of queueIndexs */
+#define MessageQ_GROWSIZE 32
/* Define BENCHMARK to quiet key MessageQ APIs: */
//#define BENCHMARK
/*!< Handle to the local NameServer used for storing GP objects */
pthread_mutex_t gate;
/*!< Handle of gate to be used for local thread safety */
- MessageQ_Config cfg;
+ MessageQ_Config *cfg;
/*!< Current config values */
MessageQ_Config defaultCfg;
/*!< Default config values */
* Globals
* =============================================================================
*/
+extern MessageQ_Config ti_ipc_MessageQ_cfg;
+
static MessageQ_ModuleObject MessageQ_state =
{
.refCount = 0,
#else
.gate = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
#endif
+ .cfg = &ti_ipc_MessageQ_cfg,
.defaultCfg.traceFlag = FALSE,
.defaultCfg.maxRuntimeEntries = 32u,
.defaultCfg.maxNameLen = 32u,
+ .defaultCfg.numReservedEntries = 0
};
/*!
memcpy(cfg, &MessageQ_module->defaultCfg, sizeof(MessageQ_Config));
}
else {
- memcpy(cfg, &MessageQ_module->cfg, sizeof(MessageQ_Config));
+ memcpy(cfg, MessageQ_module->cfg, sizeof(MessageQ_Config));
}
}
MessageQ_module->refCount++;
if (MessageQ_module->refCount > 1) {
status = MessageQ_S_ALREADYSETUP;
- LOG1("MessageQ module has been already setup, refCount=%d\n", MessageQ_module->refCount)
-
+ LOG1("MessageQ module has been already setup, refCount=%d\n",
+ MessageQ_module->refCount)
goto exitSetup;
}
/* Initialize the parameters */
NameServer_Params_init(¶ms);
params.maxValueLen = sizeof(UInt32);
- params.maxNameLen = cfg->maxNameLen;
+ params.maxNameLen = MessageQ_module->cfg->maxNameLen;
/* Create the nameserver for modules */
MessageQ_module->nameServer = NameServer_create(MessageQ_NAMESERVER,
¶ms);
- memcpy(&MessageQ_module->cfg, (void *)cfg, sizeof(MessageQ_Config));
-
MessageQ_module->seqNum = 0;
- MessageQ_module->numQueues = cfg->maxRuntimeEntries;
+ MessageQ_module->numQueues = MessageQ_module->cfg->maxRuntimeEntries;
MessageQ_module->queues = (MessageQ_Handle *)
calloc(1, sizeof(MessageQ_Handle) * MessageQ_module->numQueues);
+ MessageQ_module->canFreeQueues = TRUE;
exitSetup:
LOG1("MessageQ_setup: exiting, refCount=%d\n", MessageQ_module->refCount)
MessageQ_module->queues = NULL;
}
- memset(&MessageQ_module->cfg, 0, sizeof(MessageQ_Config));
MessageQ_module->numQueues = 0u;
- MessageQ_module->canFreeQueues = TRUE;
exitDestroy:
LOG1("MessageQ_destroy: exiting, refCount=%d\n", MessageQ_module->refCount)
return (status);
}
-/* Function to initialize the parameters for the MessageQ instance. */
-Void MessageQ_Params_init(MessageQ_Params * params)
-{
- memcpy(params, &(MessageQ_module->defaultInstParams),
- sizeof(MessageQ_Params));
-
- return;
-}
-
/*
* Function to create a MessageQ object for receiving.
*/
MessageQ_Object * obj = NULL;
Bool found = FALSE;
UInt16 count = 0;
- UInt16 queueIndex = 0u;
+ UInt16 queueIndex;
+ UInt16 queuePort;
UInt16 procId;
int i;
+ UInt numReserved;
- LOG1("MessageQ_create: creating '%s'\n", name)
+ LOG1("MessageQ_create: creating '%s'\n", (name == NULL) ? "NULL" : name)
/* Create the generic obj */
obj = (MessageQ_Object *)calloc(1, sizeof(MessageQ_Object));
+ if (obj == NULL) {
+ LOG0("MessageQ_create: Error: no memory\n")
+ return (NULL);
+ }
+
+ numReserved = MessageQ_module->cfg->numReservedEntries;
+
pthread_mutex_lock(&(MessageQ_module->gate));
- count = MessageQ_module->numQueues;
+ /* check if creating a reserved queue */
+ if (params->queueIndex != MessageQ_ANY) {
+ queueIndex = params->queueIndex;
+
+ if (queueIndex > numReserved) {
+ LOG2("MessageQ_create: Error: requested queue index %d is greater "
+ "than reserved maximum %d\n", queueIndex, numReserved - 1)
+ free(obj);
+ obj = NULL;
+ }
+ else if (MessageQ_module->queues[queueIndex] != NULL) {
+ LOG1("MessageQ_create: Error: requested queue index %d is already "
+ "in use.\n", queueIndex);
+ free(obj);
+ obj = NULL;
+ }
+
+ if (obj == NULL) {
+ pthread_mutex_unlock(&(MessageQ_module->gate));
+ return (NULL);
+ }
- /* Search the dynamic array for any holes */
- /* We start from 1, as 0 is reserved for binding NameServer: */
- for (i = RESERVED_MSGQ_INDEX; i < count ; i++) {
- if (MessageQ_module->queues [i] == NULL) {
- MessageQ_module->queues [i] = (MessageQ_Handle)obj;
- queueIndex = i;
- found = TRUE;
- break;
+ MessageQ_module->queues[queueIndex] = (MessageQ_Handle)obj;
+ found = TRUE;
+ }
+ else {
+ count = MessageQ_module->numQueues;
+
+ /* search the dynamic array for any holes */
+ for (i = numReserved; i < count ; i++) {
+ if (MessageQ_module->queues [i] == NULL) {
+ MessageQ_module->queues [i] = (MessageQ_Handle)obj;
+ queueIndex = i;
+ found = TRUE;
+ break;
+ }
}
}
memcpy((Ptr)&obj->params, (Ptr)params, sizeof(MessageQ_Params));
}
+ /* create globally unique message queue ID */
procId = MultiProc_self();
- /* create globally unique messageQ ID: */
- obj->queue = (MessageQ_QueueId)(((UInt32)procId << 16) | queueIndex);
+ queuePort = queueIndex + MessageQ_PORTOFFSET;
+ obj->queue = (MessageQ_QueueId)(((UInt32)procId << 16) | queuePort);
obj->ownerPid = 0;
if (name != NULL) {
obj->nsKey = NameServer_addUInt32(MessageQ_module->nameServer, name,
- obj->queue);
+ obj->queue);
}
/* Cleanup if fail */
MessageQ_delete((MessageQ_Handle *)&obj);
}
- LOG1("MessageQ_create: returning %p\n", obj)
+ LOG2("MessageQ_create: returning obj=%p, qid=0x%x\n", obj, obj->queue)
return ((MessageQ_Handle)obj);
}
Int status = MessageQ_S_SUCCESS;
MessageQ_Object *obj;
MessageQ_Handle queue;
+ UInt16 queueIndex;
obj = (MessageQ_Object *)(*handlePtr);
LOG1("MessageQ_delete: deleting %p\n", obj)
- queue = MessageQ_module->queues[(MessageQ_QueueIndex)(obj->queue)];
+ queueIndex = MessageQ_getQueueIndex(obj->queue);
+ queue = MessageQ_module->queues[queueIndex];
if (queue != obj) {
- LOG1(" ERROR: obj != MessageQ_module->queues[%d]\n", (MessageQ_QueueIndex)(obj->queue))
+ LOG1("ERROR: obj != MessageQ_module->queues[%d]\n", queueIndex)
}
if (obj->nsKey != NULL) {
pthread_mutex_lock(&(MessageQ_module->gate));
/* Clear the MessageQ obj from array. */
- MessageQ_module->queues[(MessageQ_QueueIndex)(obj->queue)] = NULL;
+ MessageQ_module->queues[queueIndex] = NULL;
/* Release the local lock */
pthread_mutex_unlock(&(MessageQ_module->gate));
oldSize = (MessageQ_module->numQueues) * sizeof(MessageQ_Handle);
/* Allocate larger table */
- queues = calloc(1, oldSize + sizeof(MessageQ_Handle));
+ queues = calloc(MessageQ_module->numQueues + MessageQ_GROWSIZE,
+ sizeof(MessageQ_Handle));
/* Copy contents into new table */
memcpy(queues, MessageQ_module->queues, oldSize);
/* Hook-up new table */
oldQueues = MessageQ_module->queues;
MessageQ_module->queues = queues;
- MessageQ_module->numQueues++;
+ MessageQ_module->numQueues += MessageQ_GROWSIZE;
/* Delete old table if not statically defined */
if (MessageQ_module->canFreeQueues == TRUE) {
index c004aad23581c0ac680232ded82c52d068392170..a551a4d3480f1094c42ed51c63fa466cbef1c078 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Void MultiProc_getConfig (MultiProc_Config * cfg)
{
int i;
+ UInt16 baseId;
assert (cfg != NULL);
memcpy (cfg, &_MultiProc_cfg, sizeof(MultiProc_Config));
LOG1("MultiProc_getConfig() - %d procs\n", _MultiProc_cfg.numProcessors);
+ LOG1("# processors in cluster: %d\n", _MultiProc_cfg.numProcsInCluster);
+ baseId = _MultiProc_cfg.baseIdOfCluster;
+ LOG1("cluster baseId: %d\n", baseId);
- for (i = 0; i < _MultiProc_cfg.numProcessors; i++) {
- LOG2("\tProc %d - \"%s\"\n", i, _MultiProc_cfg.nameList[i]);
+ for (i = 0; i < _MultiProc_cfg.numProcsInCluster; i++) {
+ LOG2("\tProcId %d - \"%s\"\n", baseId + i, _MultiProc_cfg.nameList[i]);
}
}
index 7cd2bad14d0e9508712eb9eecfb0bc3b5f5043c7..2fb200c80957cc7f8dcb2c0da2bf2e63a2d61b87 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/* Internal stuff: */
#include <_NameServer.h>
-#include <_NameServerRemoteRpmsg.h>
+#include <ti/ipc/namesrv/_NameServerRemoteRpmsg.h>
/* Socket utils: */
#include <SocketFxns.h>
/* structure for NameServer module state */
typedef struct NameServer_ModuleObject {
CIRCLEQ_HEAD(dummy1, NameServer_Object) objList;
- Int32 refCount;
- int sendSock[MultiProc_MAXPROCESSORS];
+ Int32 refCount;
+ int sendSock[MultiProc_MAXPROCESSORS];
/* Sockets for sending to remote proc nameserver ports: */
- int recvSock[MultiProc_MAXPROCESSORS];
+ int recvSock[MultiProc_MAXPROCESSORS];
/* Sockets for recving from remote proc nameserver ports: */
- pthread_t listener;
+ pthread_t listener;
/* Listener thread for NameServer replies and requests. */
- int unblockFd;
+ int unblockFd;
/* Event to post to exit listener. */
- int waitFd;
+ int waitFd;
/* Event to post to NameServer_get. */
- NameServerMsg nsMsg;
+ NameServerRemote_Msg nsMsg;
/* NameServer Message cache. */
- NameServer_Params defInstParams;
+ NameServer_Params defInstParams;
/* Default instance paramters */
- pthread_mutex_t modGate;
+ pthread_mutex_t modGate;
} NameServer_ModuleObject;
#define CIRCLEQ_destruct(head) { \
return (hash);
}
-static void NameServerRemote_processMessage(NameServerMsg * msg, UInt16 procId)
+static void NameServerRemote_processMessage(NameServerRemote_Msg * msg, UInt16 procId)
{
NameServer_Handle handle;
Int status = NameServer_E_FAIL;
int err;
uint64_t buf = 1;
- int numBytes;
int waitFd = NameServer_module->waitFd;
+ UInt16 clusterId;
if (msg->request == NAMESERVER_REQUEST) {
LOG2("NameServer Request: instanceName: %s, name: %s\n",
msg->reserved = NAMESERVER_MSG_TOKEN;
/* send response message to remote processor */
- err = send(NameServer_module->sendSock[procId], msg,
- sizeof(NameServerMsg), 0);
+ clusterId = procId - MultiProc_getBaseIdOfCluster();
+ err = send(NameServer_module->sendSock[clusterId], msg,
+ sizeof(NameServerRemote_Msg), 0);
if (err < 0) {
LOG2("NameServer: send failed: %d, %s\n", errno, strerror(errno))
}
@@ -300,10 +301,10 @@ static void NameServerRemote_processMessage(NameServerMsg * msg, UInt16 procId)
LOG1(", value: 0x%x\n", msg->value)
/* Save the response message. */
- memcpy(&NameServer_module->nsMsg, msg, sizeof(NameServerMsg));
+ memcpy(&NameServer_module->nsMsg, msg, sizeof(NameServerRemote_Msg));
/* Post the eventfd upon which NameServer_get() is waiting */
- numBytes = write(waitFd, &buf, sizeof(uint64_t));
+ write(waitFd, &buf, sizeof(uint64_t));
}
}
{
fd_set rfds;
int ret = 0, maxfd;
+ int i;
UInt16 procId;
struct sockaddr_rpmsg fromAddr;
unsigned int len;
- NameServerMsg msg;
+ NameServerRemote_Msg msg;
int byteCount;
- UInt16 numProcs = MultiProc_getNumProcessors();
+ UInt16 numProcs = MultiProc_getNumProcsInCluster();
+ UInt16 baseId = MultiProc_getBaseIdOfCluster();
int sock;
LOG0("listener_cb: Entered Listener thread.\n")
FD_ZERO(&rfds);
FD_SET(NameServer_module->unblockFd, &rfds);
maxfd = NameServer_module->unblockFd;
- for (procId = 0; procId < numProcs; procId++) {
- if (procId == MultiProc_self() ||
- NameServer_module->recvSock[procId] == INVALIDSOCKET) {
+
+ for (i = 0, procId = baseId; i < numProcs; i++, procId++) {
+ if ((MultiProc_self() == procId)
+ || (NameServer_module->recvSock[i] == INVALIDSOCKET)) {
continue;
}
- sock = NameServer_module->recvSock[procId];
+ sock = NameServer_module->recvSock[i];
FD_SET(sock, &rfds);
maxfd = MAX(sock, maxfd);
}
}
LOG0("NameServer: back from select()\n")
- for (procId = 0; procId < numProcs; procId++) {
- if (procId == MultiProc_self() ||
- NameServer_module->recvSock[procId] == INVALIDSOCKET) {
+ for (i = 0, procId = baseId; i < numProcs; i++, procId++) {
+ if ((MultiProc_self() == procId)
+ || (NameServer_module->recvSock[i] == INVALIDSOCKET)) {
continue;
}
- sock = NameServer_module->recvSock[procId];
+ sock = NameServer_module->recvSock[i];
if (FD_ISSET(sock, &rfds)) {
LOG1("NameServer: Listener got NameServer message "
"from sock: %d!\n", sock);
memset(&fromAddr, 0, sizeof(fromAddr));
len = sizeof(fromAddr);
- byteCount = recvfrom(sock, &msg, sizeof(NameServerMsg), 0,
+ byteCount = recvfrom(sock, &msg, sizeof(NameServerRemote_Msg), 0,
(struct sockaddr *)&fromAddr, &len);
if (len != sizeof(fromAddr)) {
LOG1("recvfrom: got bad addr len (%d)\n", len)
int err;
int sock;
int ret;
+ int clId;
UInt16 procId;
UInt16 numProcs;
+ UInt16 baseId;
pthread_mutex_lock(&NameServer_module->modGate);
- LOG1("NameServer_setup: entered, refCount=%d\n", NameServer_module->refCount)
+ LOG1("NameServer_setup: entered, refCount=%d\n",
+ NameServer_module->refCount)
NameServer_module->refCount++;
goto exit;
}
- numProcs = MultiProc_getNumProcessors();
-
NameServer_module->unblockFd = eventfd(0, 0);
if (NameServer_module->unblockFd < 0) {
status = NameServer_E_FAIL;
goto exit;
}
- for (procId = 0; procId < numProcs; procId++) {
- NameServer_module->sendSock[procId] = INVALIDSOCKET;
- NameServer_module->recvSock[procId] = INVALIDSOCKET;
+ numProcs = MultiProc_getNumProcsInCluster();
+ baseId = MultiProc_getBaseIdOfCluster();
+
+ for (clId = 0, procId = baseId; clId < numProcs; clId++, procId++) {
+ NameServer_module->sendSock[clId] = INVALIDSOCKET;
+ NameServer_module->recvSock[clId] = INVALIDSOCKET;
/* Only support NameServer to remote procs: */
- if (procId == MultiProc_self()) {
+ if (MultiProc_self() == procId) {
continue;
}
errno, strerror(errno))
}
else {
- LOG1("NameServer_setup: created send socket: %d\n", sock)
+ LOG2("NameServer_setup: created send socket: %d, procId %d\n",
+ sock, procId)
err = ConnectSocket(sock, procId, MESSAGEQ_RPMSG_PORT);
if (err < 0) {
status = NameServer_E_FAIL;
- LOG2("NameServer_setup: connect failed: %d, %s\n",
- errno, strerror(errno))
+ LOG3("NameServer_setup: connect failed: procId=%d, "
+ "errno=%d (%s)\n", procId, errno, strerror(errno))
LOG1(" closing send socket: %d\n", sock)
close(sock);
}
else {
- NameServer_module->sendSock[procId] = sock;
+ NameServer_module->sendSock[clId] = sock;
}
}
errno, strerror(errno))
}
else {
- LOG1("NameServer_setup: created recv socket: %d\n", sock)
-
+ LOG2("NameServer_setup: created recv socket: %d, procId %d\n",
+ sock, procId)
err = SocketBindAddr(sock, procId, NAME_SERVER_RPMSG_ADDR);
if (err < 0) {
status = NameServer_E_FAIL;
close(sock);
}
else {
- NameServer_module->recvSock[procId] = sock;
+ NameServer_module->recvSock[clId] = sock;
}
}
}
}
else {
/* look for at least one good send/recv pair to indicate success */
- for (procId = 0; procId < numProcs; procId++) {
- if (NameServer_module->sendSock[procId] != INVALIDSOCKET &&
- NameServer_module->recvSock[procId] != INVALIDSOCKET) {
+ for (clId = 0; clId < numProcs; clId++) {
+ if (NameServer_module->sendSock[clId] != INVALIDSOCKET &&
+ NameServer_module->recvSock[clId] != INVALIDSOCKET) {
status = NameServer_S_SUCCESS;
-
break;
}
}
}
exit:
- LOG1("NameServer_setup: exiting, refCount=%d\n", NameServer_module->refCount)
+ LOG1("NameServer_setup: exiting, refCount=%d\n",
+ NameServer_module->refCount)
pthread_mutex_unlock(&NameServer_module->modGate);
/*! Function to destroy the nameserver module. */
Int NameServer_destroy(void)
{
- Int status = NameServer_S_SUCCESS;
- UInt16 numProcs = MultiProc_getNumProcessors();
+ Int status = NameServer_S_SUCCESS;
+ UInt16 numProcs;
+ UInt16 baseId;
UInt16 procId;
+ int clId;
int sock;
uint64_t buf = 1;
- int numBytes;
pthread_mutex_lock(&NameServer_module->modGate);
- LOG1("NameServer_destroy: entered, refCount=%d\n", NameServer_module->refCount)
+ LOG1("NameServer_destroy: entered, refCount=%d\n",
+ NameServer_module->refCount)
NameServer_module->refCount--;
if (NameServer_module->refCount > 0) {
- LOG1("NameServer_destroy(): refCount(%d) > 0, exiting\n", NameServer_module->refCount)
+ LOG1("NameServer_destroy(): refCount(%d) > 0, exiting\n",
+ NameServer_module->refCount)
status = NameServer_S_SUCCESS;
-
goto exit;
}
- for (procId = 0; procId < numProcs; procId++) {
+ numProcs = MultiProc_getNumProcsInCluster();
+ baseId = MultiProc_getBaseIdOfCluster();
+
+ LOG2("NameServer_destroy: numProcs=%d, baseId=%d\n", numProcs, baseId);
+
+ for (clId = 0, procId = baseId; clId < numProcs; clId++, procId++) {
+
/* Only support NameServer to remote procs: */
- if (procId == MultiProc_self()) {
+ if (MultiProc_self() == procId) {
continue;
}
/* Close the socket: */
- sock = NameServer_module->sendSock[procId];
+ sock = NameServer_module->sendSock[clId];
if (sock != INVALIDSOCKET) {
LOG1("NameServer_destroy: closing socket: %d\n", sock)
close(sock);
- NameServer_module->sendSock[procId] = INVALIDSOCKET;
+ NameServer_module->sendSock[clId] = INVALIDSOCKET;
}
/* Close the socket: */
- sock = NameServer_module->recvSock[procId];
+ sock = NameServer_module->recvSock[clId];
if (sock != INVALIDSOCKET) {
LOG1("NameServer_destroy: closing socket: %d\n", sock)
close(sock);
- NameServer_module->recvSock[procId] = INVALIDSOCKET;
+ NameServer_module->recvSock[clId] = INVALIDSOCKET;
}
}
/* Unblock the NameServer listener thread: */
LOG0("NameServer_destroy: unblocking listener...\n")
- numBytes = write(NameServer_module->unblockFd, &buf, sizeof(uint64_t));
+ write(NameServer_module->unblockFd, &buf, sizeof(uint64_t));
/* Join: */
LOG0("NameServer_destroy: joining listener thread...\n")
close(NameServer_module->waitFd);
exit:
- LOG1("NameServer_destroy: exiting, refCount=%d\n", NameServer_module->refCount)
+ LOG1("NameServer_destroy: exiting, refCount=%d\n",
+ NameServer_module->refCount)
pthread_mutex_unlock(&NameServer_module->modGate);
/* Calculate the hash */
hash = stringHash(name);
+ pthread_mutex_lock(&handle->gate);
+
+ if (strlen(name) > handle->params.maxNameLen - 1) {
+ status = NameServer_E_INVALIDARG;
+ LOG0("NameServer_add: name length exceeded maximum!\n")
+ new_node = NULL;
+ goto exit;
+ }
+
if (len > handle->params.maxValueLen) {
status = NameServer_E_INVALIDARG;
LOG0("NameServer_add: value length exceeded maximum!\n")
goto exit;
}
- pthread_mutex_lock(&handle->gate);
-
/* Traverse the list to find duplicate check */
CIRCLEQ_traverse(node, &handle->nameList, NameServer_TableEntry_tag) {
/* Hash matches */
{
Int status = NameServer_S_SUCCESS;
struct NameServer_Object *obj = (struct NameServer_Object *)(handle);
- NameServerMsg nsMsg;
- NameServerMsg *replyMsg;
+ NameServerRemote_Msg nsMsg;
+ NameServerRemote_Msg *replyMsg;
fd_set rfds;
int ret = 0, sock, maxfd, waitFd;
struct timeval tv;
uint64_t buf = 1;
- int numBytes;
int err;
int i;
static int seqNum = 0;
Bool done = FALSE;
+ UInt16 clusterId;
+
+ if (strlen(name) >= MAXNAMEINCHAR) {
+ LOG0("Name is too long in remote query\n");
+ return NameServer_E_NAMETOOLONG;
+ }
+
+ if (strlen(obj->name) >= MAXNAMEINCHAR) {
+ LOG0("Instance name is too long for remote query\n");
+ return NameServer_E_NAMETOOLONG;
+ }
/* Set Timeout to wait: */
tv.tv_sec = 0;
tv.tv_usec = NAMESERVER_GET_TIMEOUT;
/* Create request message and send to remote: */
- sock = NameServer_module->sendSock[procId];
+ clusterId = procId - MultiProc_getBaseIdOfCluster();
+ sock = NameServer_module->sendSock[clusterId];
if (sock == INVALIDSOCKET) {
LOG1("NameServer_getRemote: no socket connection to processor %d\n",
procId);
procId, (String)nsMsg.instanceName)
LOG1("%s...\n", (String)nsMsg.name)
- err = send(sock, &nsMsg, sizeof(NameServerMsg), 0);
+ err = send(sock, &nsMsg, sizeof(NameServerRemote_Msg), 0);
if (err < 0) {
LOG2("NameServer_getRemote: send failed: %d, %s\n",
errno, strerror(errno))
if (FD_ISSET(waitFd, &rfds)) {
/* Read, just to balance the write: */
- numBytes = read(waitFd, &buf, sizeof(uint64_t));
+ read(waitFd, &buf, sizeof(uint64_t));
/* Process response: */
replyMsg = &NameServer_module->nsMsg;
UInt16 procId[])
{
Int status = NameServer_S_SUCCESS;
- UInt16 numProcs = MultiProc_getNumProcessors();
+ UInt16 numProcs;
UInt32 i;
+ UInt16 clusterId;
+ UInt16 baseId;
+
+ numProcs = MultiProc_getNumProcsInCluster();
+ baseId = MultiProc_getBaseIdOfCluster();
/*
* BIOS side uses a gate (mutex) to protect NameServer_module->nsMsg, but
if (procId == NULL) {
status = NameServer_getLocal(handle, name, value, len);
if (status == NameServer_E_NOTFOUND) {
- for (i = 0; i < numProcs; i++) {
+ for (clusterId = 0; clusterId < numProcs; clusterId++) {
+
/* getLocal call already covers "self", keep going */
- if (i == MultiProc_self()) {
+ if ((baseId + clusterId) == MultiProc_self()) {
continue;
}
- status = NameServer_getRemote(handle, name, value, len, i);
+ status = NameServer_getRemote(handle, name, value, len,
+ baseId + clusterId);
if ((status >= 0) ||
((status < 0) && (status != NameServer_E_NOTFOUND) &&
status = NameServer_getLocal(handle, name, value, len);
}
else {
- status = NameServer_getRemote(handle, name, value, len, i);
+ status = NameServer_getRemote(handle, name, value, len,
+ procId[i]);
}
if ((status >= 0) ||
diff --git a/linux/src/daemon/GateHWSpinlockCfg_dra7xx.c b/linux/src/daemon/cfg/GateHWSpinlockCfg_dra7xx.c
similarity index 95%
rename from linux/src/daemon/GateHWSpinlockCfg_dra7xx.c
rename to linux/src/daemon/cfg/GateHWSpinlockCfg_dra7xx.c
index ebe323af6fd1ce7ae9cf478cf4773c71b573ae06..da701b9dbc7a14877b2d953ecf6bbbd6c7a755a6 100644 (file)
rename from linux/src/daemon/GateHWSpinlockCfg_dra7xx.c
rename to linux/src/daemon/cfg/GateHWSpinlockCfg_dra7xx.c
index ebe323af6fd1ce7ae9cf478cf4773c71b573ae06..da701b9dbc7a14877b2d953ecf6bbbd6c7a755a6 100644 (file)
/*
- * Copyright (c) 2014, Texas Instruments Incorporated
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/linux/src/daemon/cfg/MessageQCfg.c b/linux/src/daemon/cfg/MessageQCfg.c
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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 MessageQCfg.c
+ *
+ * @brief Module configuration
+ */
+
+#include <ti/ipc/Std.h>
+#include <_MessageQ.h>
+
+/*
+ * ======== ti_ipc_MessageQ_cfg ========
+ * The MessageQ module configuration object
+ */
+MessageQ_Config ti_ipc_MessageQ_cfg = {
+ .traceFlag = FALSE,
+ .maxRuntimeEntries = 32,
+ .maxNameLen = 32,
+ .numReservedEntries = 0
+};
similarity index 90%
rename from linux/src/daemon/MultiProcCfg_66ak2e.c
rename to linux/src/daemon/cfg/MultiProcCfg_66ak2e.c
index 3b48b78daf3e247bc0b906a191fb5efc8a492077..d9d87687a8eb0a149e1e1fceeb47ef1ae46bf910 100644 (file)
rename from linux/src/daemon/MultiProcCfg_66ak2e.c
rename to linux/src/daemon/cfg/MultiProcCfg_66ak2e.c
index 3b48b78daf3e247bc0b906a191fb5efc8a492077..d9d87687a8eb0a149e1e1fceeb47ef1ae46bf910 100644 (file)
/*
- * Copyright (c) 2014, Texas Instruments Incorporated
+ * Copyright (c) 2014-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.nameList[1] = "CORE0",
.rprocList[0] = -1,
.rprocList[1] = 0,
- .id = 0, /* The host is always zero */
+ .id = 0, /* host processor must be coherent with cluster */
+ .numProcsInCluster = 2,
+ .baseIdOfCluster = 0
};
similarity index 94%
rename from linux/src/daemon/MultiProcCfg_dra7xx.c
rename to linux/src/daemon/cfg/MultiProcCfg_dra7xx.c
index 4e98715521191d259e4033e614efd28380d15edf..5bd96d7bec8cf7a22b1b916e1de4ba07ebd3f0b7 100644 (file)
rename from linux/src/daemon/MultiProcCfg_dra7xx.c
rename to linux/src/daemon/cfg/MultiProcCfg_dra7xx.c
index 4e98715521191d259e4033e614efd28380d15edf..5bd96d7bec8cf7a22b1b916e1de4ba07ebd3f0b7 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[4] = 2,
#endif /* LINUX_VERSION_CODE */
.id = 0, /* The host is always zero */
+ .numProcsInCluster = 5,
+ .baseIdOfCluster = 0
};
diff --git a/linux/src/daemon/MultiProcCfg_omap54xx_smp.c b/linux/src/daemon/cfg/MultiProcCfg_omap54xx_smp.c
similarity index 94%
rename from linux/src/daemon/MultiProcCfg_omap54xx_smp.c
rename to linux/src/daemon/cfg/MultiProcCfg_omap54xx_smp.c
index 3cabbac980572a261d9fa9141e9594620e6ff28b..e6e0bffe60fec12654c38763377143f96f9f2a22 100644 (file)
rename from linux/src/daemon/MultiProcCfg_omap54xx_smp.c
rename to linux/src/daemon/cfg/MultiProcCfg_omap54xx_smp.c
index 3cabbac980572a261d9fa9141e9594620e6ff28b..e6e0bffe60fec12654c38763377143f96f9f2a22 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[1] = 1,
.rprocList[2] = 0,
.id = 0, /* The host is always zero */
+ .numProcsInCluster = 3,
+ .baseIdOfCluster = 0
};
diff --git a/linux/src/daemon/MultiProcCfg_omapl138.c b/linux/src/daemon/cfg/MultiProcCfg_omapl138.c
similarity index 94%
rename from linux/src/daemon/MultiProcCfg_omapl138.c
rename to linux/src/daemon/cfg/MultiProcCfg_omapl138.c
index d7508e8eedefe7554f9f8c35d96b231fea4428eb..6fd5fd3a89253cec4c237d10fd5c15bdf29a68c5 100644 (file)
rename from linux/src/daemon/MultiProcCfg_omapl138.c
rename to linux/src/daemon/cfg/MultiProcCfg_omapl138.c
index d7508e8eedefe7554f9f8c35d96b231fea4428eb..6fd5fd3a89253cec4c237d10fd5c15bdf29a68c5 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[0] = -1,
.rprocList[1] = 0,
.id = 0, /* The host is always zero */
+ .numProcsInCluster = 2,
+ .baseIdOfCluster = 0
};
similarity index 91%
rename from linux/src/daemon/MultiProcCfg_tci6614.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6614.c
index 1528b25099ba8b994ad46e384738ace9ae44bc5d..af50bf51ff0939d571e794c13e4ef2ef6adf2035 100644 (file)
rename from linux/src/daemon/MultiProcCfg_tci6614.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6614.c
index 1528b25099ba8b994ad46e384738ace9ae44bc5d..af50bf51ff0939d571e794c13e4ef2ef6adf2035 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[2] = 1,
.rprocList[3] = 2,
.rprocList[4] = 3,
- .id = 0, /* The host is always zero */
+ .id = 0, /* host processor must be coherent with cluster */
+ .numProcsInCluster = 5,
+ .baseIdOfCluster = 0
};
similarity index 91%
rename from linux/src/daemon/MultiProcCfg_tci6630.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6630.c
index 0c48322be99dd23e8d65a7e174b968402720b168..af50bf51ff0939d571e794c13e4ef2ef6adf2035 100644 (file)
rename from linux/src/daemon/MultiProcCfg_tci6630.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6630.c
index 0c48322be99dd23e8d65a7e174b968402720b168..af50bf51ff0939d571e794c13e4ef2ef6adf2035 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[2] = 1,
.rprocList[3] = 2,
.rprocList[4] = 3,
- .id = 0, /* The host is always zero */
+ .id = 0, /* host processor must be coherent with cluster */
+ .numProcsInCluster = 5,
+ .baseIdOfCluster = 0
};
similarity index 92%
rename from linux/src/daemon/MultiProcCfg_tci6638.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6638.c
index 18b338a8d5fa3730e7b161d68f1c90dec87eb215..7668aa60f801cef4e0cf31dcc6fb3a7367cf4dbe 100644 (file)
rename from linux/src/daemon/MultiProcCfg_tci6638.c
rename to linux/src/daemon/cfg/MultiProcCfg_tci6638.c
index 18b338a8d5fa3730e7b161d68f1c90dec87eb215..7668aa60f801cef4e0cf31dcc6fb3a7367cf4dbe 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.rprocList[6] = 5,
.rprocList[7] = 6,
.rprocList[8] = 7,
- .id = 0, /* The host is always zero */
+ .id = 0, /* host processor must be coherent with cluster */
+ .numProcsInCluster = 9,
+ .baseIdOfCluster = 0
};
diff --git a/linux/src/daemon/lad.c b/linux/src/daemon/lad.c
index 11b37fd0c01843f43c02e76d1517a3244cc26183..1162c2d3701bf48ec4f60b81c5b79b9e257c4427 100644 (file)
--- a/linux/src/daemon/lad.c
+++ b/linux/src/daemon/lad.c
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <_NameServer.h>
#include <ti/ipc/GateMP.h>
#include <_GateMP_daemon.h>
+#include <_MultiProc.h>
#include <GateHWSpinlock.h>
g : enable GateMP support \n\
l <logfile> : name of logfile for LAD\n\
p <oct value>: set LAD's directory permissions\n\
+ b <value> : Processor's base cluster id \n\
\n\
Examples:\n\
lad_<platform> -h\n\
lad_<platform> -l log.txt\n\
lad_<platform> -l log.txt -p 777\n\
lad_<platform> -g -l log.txt\n\
+ lad_<platform> -l log.txt -b 10\n\
\n"
/*
/* process command line args */
while (1) {
- c = getopt(argc, argv, "ghl:p:");
+ c = getopt(argc, argv, "b:ghl:p:");
if (c == -1) {
break;
}
printf("\nGateMP is not supported for this device\n");
#endif
break;
+ case 'b':
+ if (_MultiProc_cfg.id == 0xFFFF &&
+ _MultiProc_cfg.baseIdOfCluster == 0xFFFF) {
+ printf("\nSetting base cluster id to %s\n", optarg);
+ _MultiProc_cfg.id = atoi(optarg);
+ _MultiProc_cfg.baseIdOfCluster = atoi(optarg);
+ }
+ else {
+ printf("\nBase cluster id in the MultiProcCfg file must be\n"
+ "set to MultiProc_INVALIDID(0xFFFF) when using -b option\n");
+ exit(EXIT_FAILURE);
+ }
+ break;
case 'h':
printf("%s", LAD_USAGE);
exit(0);
}
}
+ /* Check to ensure id and baseId are not invalid */
+ printf ("id = %d baseId= %d\n", _MultiProc_cfg.id, _MultiProc_cfg.baseIdOfCluster);
+ if (_MultiProc_cfg.id == 0xFFFF || _MultiProc_cfg.baseIdOfCluster == 0xFFFF){
+ printf("\nBase cluster id is set to an INVALID value\n");
+ printf("Use -b option to set value or modify the MultiProcCfg file\n");
+ exit(EXIT_FAILURE);
+ }
+
+
#if DAEMON
/* fork off a child process */
pid = fork();
index 9211ab83f0e4de15f61dfbe6fd23e436cb013936..7e50d529ebf252ef4a3478a45d352820fdd5873b 100644 (file)
--- a/linux/src/mm/Makefile.in
+++ b/linux/src/mm/Makefile.in
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
index 1b13460ba05397a4cddd56c1a852ecef2c569fbf..04d56b5016b6b78c81dbad67094f13da5cdc406f 100644 (file)
GateMPApp_Msg * msg;
IArg gateKey = 0;
UInt32 num;
+ UInt32 prevNum;
printf("--> GateMPApp_exec:\n");
/* enter GateMP */
gateKey = GateMP_enter(Module.hostGateMPHandle);
+ /* read shared variable value */
+ prevNum = *Module.intPtr;
+
/* randomly modify the shared variable */
if (rand() % 2) {
*Module.intPtr -= 1;
*Module.intPtr += 1;
}
- /* read shared variable value */
+ /* read shared variable value again*/
num = *Module.intPtr;
- printf("GateMPApp_exec: Current value: %d, " \
- "previously read=%d\n", *Module.intPtr, num);
- if (*Module.intPtr != num) {
- printf("GateMPApp_exec: mismatch in variable value." \
+ if ((prevNum != num + 1) && (prevNum != num - 1)) {
+ printf("GateMPApp_exec: unexpected variable value." \
"Test failed.\n");
+ printf("GateMPApp_exec: Previous value: %d, " \
+ "current value=%d\n", prevNum, num);
+
status = GATEMPAPP_E_FAILURE;
goto leave;
}
/* enter GateMP */
gateKey = GateMP_enter(Module.slaveGateMPHandle);
+ /* read shared variable value */
+ prevNum = *Module.intPtr;
+
/* randomly modify the shared variable */
if (rand() % 2) {
*Module.intPtr -= 1;
*Module.intPtr += 1;
}
- /* read shared variable value */
+ /* read shared variable value again */
num = *Module.intPtr;
- printf("GateMPApp_exec: Current value: %d, " \
- "previously read=%d\n", *Module.intPtr, num);
- if (*Module.intPtr != num) {
- printf("GateMPApp_exec: mismatch in variable value." \
+ if ((prevNum != num + 1) && (prevNum != num - 1)) {
+ printf("GateMPApp_exec: unexpected variable value." \
"Test failed.\n");
+ printf("GateMPApp_exec: Previous value: %d, " \
+ "current value=%d\n", prevNum, num);
+
status = GATEMPAPP_E_FAILURE;
goto leave;
}
index 959f3ac09dc3c1efcf431d3a12ffb16ee0db70f6..f6e1ed1e03fe771da75224bc48cd86354973542a 100644 (file)
##
-## Copyright (c) 2013-2014, Texas Instruments Incorporated
+## Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
##
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include \
- -I$(top_srcdir)/hlos_common/include \
- -I$(top_srcdir)/packages \
- -I$(KERNEL_INSTALL_DIR)/include/generated/uapi \
- -D_GNU_SOURCE -Wall @AM_CFLAGS@
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall
if DRM
AM_CFLAGS += \
endif
if CMEM
-AM_CFLAGS += \
- -I$(CMEM_INSTALL_DIR)/include
+AM_CFLAGS += -I$(CMEM_INSTALL_DIR)/include
+endif
+
+if KERNEL_INSTALL_DIR
+AM_CFLAGS += -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
endif
+if AF_RPMSG
+AM_CFLAGS += -DAF_RPMSG=$(AF_RPMSG)
+endif
+
+AM_CFLAGS += -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages @AM_CFLAGS@
+
VPATH = ../../../packages/ti/ipc/tests
###############################################################################
# the program to build (the names of the final binaries)
bin_PROGRAMS = ping_rpmsg MessageQApp MessageQBench MessageQMulti \
- NameServerApp Msgq100
+ MessageQMultiMulti NameServerApp Msgq100
if OMAP54XX_SMP
$(top_srcdir)/packages/ti/ipc/NameServer.h \
NameServerApp.c
+
# list of sources for the 'ping_rpmsg' binary
ping_rpmsg_SOURCES = ping_rpmsg.c
# list of sources for the 'MessageQMulti' binary
MessageQMulti_SOURCES = $(common_sources) MessageQMulti.c
+# list of sources for the 'MessageQMultiMulti' binary
+MessageQMultiMulti_SOURCES = $(common_sources) MessageQMultiMulti.c
+
# list of sources for the 'NameServerApp' binary
NameServerApp_SOURCES = $(nameServer_common_sources)
$(top_srcdir)/packages/ti/ipc/tests/GateMPAppCommon.h
common_libraries = -lpthread $(top_builddir)/linux/src/api/libtiipc.la \
- $(top_builddir)/linux/src/utils/libtiipcutils.la
+ $(top_builddir)/linux/src/utils/libtiipcutils.la \
+ $(top_builddir)/linux/src/transport/libtitransportrpmsg.la
+
# the additional libraries to link ping_rpmsg
ping_rpmsg_LDADD = -lrt
MessageQMulti_LDADD = $(common_libraries) \
$(AM_LDFLAGS)
+# the additional libraries needed to link MessageQMultiMulti
+MessageQMultiMulti_LDADD = $(common_libraries) \
+ $(AM_LDFLAGS)
+
# the additional libraries needed to link NameServerApp
NameServerApp_LDADD = $(common_libraries) \
$(AM_LDFLAGS)
index 50f06fa4aff35cda116bb76f0ac188f50d2b2517..55e40676b5d774b0b79f94e8ea2d2e5de1220409 100644 (file)
@DRM_TRUE@ -I$(DRM_PREFIX)/usr/include/libdrm \
@DRM_TRUE@ -I$(DRM_PREFIX)/usr/include/omap
-@CMEM_TRUE@am__append_2 = \
-@CMEM_TRUE@ -I$(CMEM_INSTALL_DIR)/include
-
+@CMEM_TRUE@am__append_2 = -I$(CMEM_INSTALL_DIR)/include
+@KERNEL_INSTALL_DIR_TRUE@am__append_3 = -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
+@AF_RPMSG_TRUE@am__append_4 = -DAF_RPMSG=$(AF_RPMSG)
bin_PROGRAMS = ping_rpmsg$(EXEEXT) MessageQApp$(EXEEXT) \
MessageQBench$(EXEEXT) MessageQMulti$(EXEEXT) \
- NameServerApp$(EXEEXT) Msgq100$(EXEEXT) $(am__EXEEXT_1) \
- $(am__EXEEXT_2) $(am__EXEEXT_1) $(am__EXEEXT_3) \
- $(am__EXEEXT_4) $(am__EXEEXT_1) $(am__EXEEXT_5) \
+ MessageQMultiMulti$(EXEEXT) NameServerApp$(EXEEXT) \
+ Msgq100$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
+ $(am__EXEEXT_1) $(am__EXEEXT_3) $(am__EXEEXT_4) \
+ $(am__EXEEXT_1) $(am__EXEEXT_5) $(am__EXEEXT_1) \
$(am__EXEEXT_1) $(am__EXEEXT_1) $(am__EXEEXT_1) \
- $(am__EXEEXT_1) $(am__EXEEXT_1) $(am__EXEEXT_6) \
- $(am__EXEEXT_7)
+ $(am__EXEEXT_1) $(am__EXEEXT_6) $(am__EXEEXT_7)
# Add platform specific bin application's here
-@OMAP54XX_SMP_TRUE@am__append_3 =
-@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_TRUE@am__append_4 = mmrpc_test
+@OMAP54XX_SMP_TRUE@am__append_5 =
+@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_TRUE@am__append_6 = mmrpc_test
# Add platform specific bin application's here
-@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_5 =
-@CMEM_TRUE@@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_6 = GateMPApp
-@DRA7XX_TRUE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@am__append_7 = mmrpc_test
+@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_7 =
+@CMEM_TRUE@@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_8 = GateMPApp
+@DRA7XX_TRUE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@am__append_9 = mmrpc_test
# Add platform specific bin application's here
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_8 =
-@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_9 = nano_test
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_10 =
+@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_11 = nano_test
# Add platform specific bin application's here
-@C66AK2E_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@am__append_10 =
+@C66AK2E_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@am__append_12 =
# Add platform specific bin application's here
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_11 =
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_13 =
# Add platform specific bin applications here
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_TRUE@am__append_12 =
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_TRUE@am__append_14 =
# Add platform specific bin application's here
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_TRUE@am__append_13 =
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_TRUE@am__append_15 =
# Add platform specific bin application's here
-@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_14 =
+@C66AK2E_FALSE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_16 =
# Add platform independent apps here or above in bin_PROGRAMS
-@C66AK2E_FALSE@@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_15 = nano_test
-@C66AK2E_FALSE@@DRA7XX_FALSE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_16 = mmrpc_test
+@C66AK2E_FALSE@@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_17 = nano_test
+@C66AK2E_FALSE@@DRA7XX_FALSE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6630_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_18 = mmrpc_test
subdir = linux/src/tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
GateMPApp.$(OBJEXT)
GateMPApp_OBJECTS = $(am_GateMPApp_OBJECTS)
am__DEPENDENCIES_1 = $(top_builddir)/linux/src/api/libtiipc.la \
- $(top_builddir)/linux/src/utils/libtiipcutils.la
+ $(top_builddir)/linux/src/utils/libtiipcutils.la \
+ $(top_builddir)/linux/src/transport/libtitransportrpmsg.la
am__DEPENDENCIES_2 =
GateMPApp_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(CMEM_INSTALL_DIR)/src/cmem/api/.libs/libticmem.a \
MessageQMulti_OBJECTS = $(am_MessageQMulti_OBJECTS)
MessageQMulti_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2)
+am_MessageQMultiMulti_OBJECTS = $(am__objects_1) \
+ MessageQMultiMulti.$(OBJEXT)
+MessageQMultiMulti_OBJECTS = $(am_MessageQMultiMulti_OBJECTS)
+MessageQMultiMulti_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
am_Msgq100_OBJECTS = $(am__objects_1) Msgq100.$(OBJEXT)
Msgq100_OBJECTS = $(am_Msgq100_OBJECTS)
Msgq100_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(GateMPApp_SOURCES) $(MessageQApp_SOURCES) \
$(MessageQBench_SOURCES) $(MessageQMulti_SOURCES) \
- $(Msgq100_SOURCES) $(NameServerApp_SOURCES) \
- $(mmrpc_test_SOURCES) $(nano_test_SOURCES) \
- $(ping_rpmsg_SOURCES)
+ $(MessageQMultiMulti_SOURCES) $(Msgq100_SOURCES) \
+ $(NameServerApp_SOURCES) $(mmrpc_test_SOURCES) \
+ $(nano_test_SOURCES) $(ping_rpmsg_SOURCES)
DIST_SOURCES = $(GateMPApp_SOURCES) $(MessageQApp_SOURCES) \
$(MessageQBench_SOURCES) $(MessageQMulti_SOURCES) \
- $(Msgq100_SOURCES) $(NameServerApp_SOURCES) \
- $(mmrpc_test_SOURCES) $(nano_test_SOURCES) \
- $(ping_rpmsg_SOURCES)
+ $(MessageQMultiMulti_SOURCES) $(Msgq100_SOURCES) \
+ $(NameServerApp_SOURCES) $(mmrpc_test_SOURCES) \
+ $(nano_test_SOURCES) $(ping_rpmsg_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
VPATH = ../../../packages/ti/ipc/tests
ACLOCAL = @ACLOCAL@
+AF_RPMSG = @AF_RPMSG@
+AF_RPMSG_FALSE = @AF_RPMSG_FALSE@
+AF_RPMSG_TRUE = @AF_RPMSG_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
# additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include \
- -I$(top_srcdir)/hlos_common/include -I$(top_srcdir)/packages \
- -I$(KERNEL_INSTALL_DIR)/include/generated/uapi -D_GNU_SOURCE \
- -Wall @AM_CFLAGS@ $(am__append_1) $(am__append_2)
+AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall \
+ $(am__append_1) $(am__append_2) $(am__append_3) \
+ $(am__append_4) -I$(top_srcdir)/linux/include \
+ -I$(top_srcdir)/packages @AM_CFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
KDIR_FALSE = @KDIR_FALSE@
KDIR_TRUE = @KDIR_TRUE@
KERNEL_INSTALL_DIR = @KERNEL_INSTALL_DIR@
+KERNEL_INSTALL_DIR_FALSE = @KERNEL_INSTALL_DIR_FALSE@
+KERNEL_INSTALL_DIR_TRUE = @KERNEL_INSTALL_DIR_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
# list of sources for the 'MessageQMulti' binary
MessageQMulti_SOURCES = $(common_sources) MessageQMulti.c
+# list of sources for the 'MessageQMultiMulti' binary
+MessageQMultiMulti_SOURCES = $(common_sources) MessageQMultiMulti.c
+
# list of sources for the 'NameServerApp' binary
NameServerApp_SOURCES = $(nameServer_common_sources)
$(top_srcdir)/packages/ti/ipc/tests/GateMPAppCommon.h
common_libraries = -lpthread $(top_builddir)/linux/src/api/libtiipc.la \
- $(top_builddir)/linux/src/utils/libtiipcutils.la
+ $(top_builddir)/linux/src/utils/libtiipcutils.la \
+ $(top_builddir)/linux/src/transport/libtitransportrpmsg.la
# the additional libraries to link ping_rpmsg
$(AM_LDFLAGS)
+# the additional libraries needed to link MessageQMultiMulti
+MessageQMultiMulti_LDADD = $(common_libraries) \
+ $(AM_LDFLAGS)
+
+
# the additional libraries needed to link NameServerApp
NameServerApp_LDADD = $(common_libraries) \
$(AM_LDFLAGS)
MessageQMulti$(EXEEXT): $(MessageQMulti_OBJECTS) $(MessageQMulti_DEPENDENCIES)
@rm -f MessageQMulti$(EXEEXT)
$(LINK) $(MessageQMulti_LDFLAGS) $(MessageQMulti_OBJECTS) $(MessageQMulti_LDADD) $(LIBS)
+MessageQMultiMulti$(EXEEXT): $(MessageQMultiMulti_OBJECTS) $(MessageQMultiMulti_DEPENDENCIES)
+ @rm -f MessageQMultiMulti$(EXEEXT)
+ $(LINK) $(MessageQMultiMulti_LDFLAGS) $(MessageQMultiMulti_OBJECTS) $(MessageQMultiMulti_LDADD) $(LIBS)
Msgq100$(EXEEXT): $(Msgq100_OBJECTS) $(Msgq100_DEPENDENCIES)
@rm -f Msgq100$(EXEEXT)
$(LINK) $(Msgq100_LDFLAGS) $(Msgq100_OBJECTS) $(Msgq100_LDADD) $(LIBS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQApp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQBench.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQMulti.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQMultiMulti.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Msgq100.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameServerApp.Po@am__quote@
index 1f5bb5fc30202554a1b4fd9f426fba27c72a68a0..908e0d648f88f500a73ca40152d1d86d144ae951 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <ti/ipc/Std.h>
#include <ti/ipc/Ipc.h>
#include <ti/ipc/MessageQ.h>
+#include <ti/ipc/transports/TransportRpmsg.h>
/* App defines: Must match on remote proc side: */
#define HEAPID 0u
int main (int argc, char ** argv)
{
- Int32 status = 0;
- UInt32 numLoops = NUM_LOOPS_DFLT;
+ Int status = 0;
+ UInt numLoops = NUM_LOOPS_DFLT;
UInt16 procId = PROC_ID_DFLT;
/* Parse Args: */
exit(0);
}
+ /* configure the transport factory */
+ Ipc_transportConfig(&TransportRpmsg_Factory);
+
+ /* IPC initialization */
status = Ipc_start();
+ if (status < 0) {
+ printf("Error: Ipc_start failed, error=%d\n", status);
+ goto exit;
+ }
+
if ((procId == 0) || (procId >= MultiProc_getNumProcessors())) {
printf("ProcId (%d) must be nonzero and less than %d\n",
procId, MultiProc_getNumProcessors());
printf("Ipc_start failed: status = %d\n", status);
}
- return(0);
+exit:
+ return (status);
}
index edbfc34e39ceaba4f8125ae26d6135987edb169f..5fbfcbef3de3b098b7c7b52109fada825b392cef 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <ti/ipc/Std.h>
#include <ti/ipc/Ipc.h>
#include <ti/ipc/MessageQ.h>
+#include <ti/ipc/transports/TransportRpmsg.h>
#define MINPAYLOADSIZE (2 * sizeof(UInt32))
exit(0);
}
+ /* configure the transport factory */
+ Ipc_transportConfig(&TransportRpmsg_Factory);
+
+ /* IPC initialization */
status = Ipc_start();
+ if (status < 0) {
+ printf("Error: Ipc_start failed, error=%d\n", status);
+ goto exit;
+ }
+
if (procId >= MultiProc_getNumProcessors()) {
printf("ProcId must be less than %d\n", MultiProc_getNumProcessors());
Ipc_stop();
printf("Ipc_start failed: status = %d\n", status);
}
+exit:
return (status);
}
index a2c41d465cf620061dee34001b2474de073ade63..05f6997a09c2519809146599057d2cd9ddc792e4 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* =============================================================================
- * @file MessageQApp.c
+ * @file MessageQMulti.c
*
* @brief Sample application for MessageQ module between MPU and Remote Proc
*
#include <ti/ipc/Std.h>
#include <ti/ipc/Ipc.h>
#include <ti/ipc/MessageQ.h>
+#include <ti/ipc/transports/TransportRpmsg.h>
/* App defines: Must match on remote proc side: */
#define MSGSIZE 64u
printf("ProcNum: %d\n", procNum);
}
+ /* configure the transport factory */
+ Ipc_transportConfig(&TransportRpmsg_Factory);
+
+ /* IPC initialization */
status = Ipc_start();
+
if (status < 0) {
printf ("Ipc_start failed: status = 0x%x\n", status);
goto exit;
Ipc_stop();
exit:
-
- return (0);
+ return (status);
}
diff --git a/linux/src/tests/MessageQMultiMulti.c b/linux/src/tests/MessageQMultiMulti.c
--- /dev/null
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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 MessageQMultiMulti.c
+ *
+ * @brief Sample application for MessageQ module between MPU and Remote Proc
+ *
+ * ============================================================================
+ */
+
+/* Standard headers */
+#include <pthread.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* IPC Headers */
+#include <ti/ipc/Std.h>
+#include <ti/ipc/Ipc.h>
+#include <ti/ipc/MessageQ.h>
+#include <ti/ipc/transports/TransportRpmsg.h>
+
+/* App defines: Must match on remote proc side: */
+#define MSGSIZE 64u
+#define HEAPID 0u
+#define SLAVE_MESSAGEQNAME "SLAVE"
+#define HOST_MESSAGEQNAME "HOST"
+
+/** ============================================================================
+ * Macros and types
+ * ============================================================================
+ */
+
+#define NUM_LOOPS_DFLT 1000
+#define NUM_THREADS_DFLT 10
+#define MAX_NUM_THREADS 25
+#define ONE_PROCESS_ONLY (-1)
+
+/** ============================================================================
+ * Globals
+ * ============================================================================
+ */
+static Int numLoops, numThreads, procNum;
+
+struct thread_info { /* Used as argument to thread_start() */
+ pthread_t thread_id; /* ID returned by pthread_create() */
+ int thread_num; /* Application-defined thread # */
+};
+
+static void * pingThreadFxn(void *arg);
+
+/** ============================================================================
+ * Functions
+ * ============================================================================
+ */
+
+static Void * pingThreadFxn(void *arg)
+{
+ Int threadNum = *(int *)arg;
+ Int32 status = 0;
+ MessageQ_Msg msg = NULL;
+ MessageQ_Params msgParams;
+ UInt16 i;
+ MessageQ_Handle handle;
+ MessageQ_QueueId queueId = MessageQ_INVALIDMESSAGEQ;
+
+ char remoteQueueName[64];
+ char hostQueueName[64];
+
+ printf ("Entered pingThreadFxn: %d\n", threadNum);
+
+ sprintf(remoteQueueName, "%s_%d%d", SLAVE_MESSAGEQNAME, threadNum, (threadNum % (MultiProc_getNumProcessors() - 1)) + 1);
+ sprintf(hostQueueName, "%s_%d", HOST_MESSAGEQNAME, threadNum );
+
+ /* Create the local Message Queue for receiving. */
+ MessageQ_Params_init (&msgParams);
+ handle = MessageQ_create (hostQueueName, &msgParams);
+ if (handle == NULL) {
+ printf ("Error in MessageQ_create\n");
+ goto exit;
+ }
+ else {
+ printf ("thread: %d, Local Message: %s, QId: 0x%x\n",
+ threadNum, hostQueueName, MessageQ_getQueueId(handle));
+ }
+
+&